#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll P=1000000007LL;
int n,m;
int tot1,head1[500005],ver1[1000005],Next1[1000005];
int totn,dfn[500005],low[500005],vis[500005],br[1000005];
int tot,head[500005],ver[1000005],Next[1000005],res,c[500005],f[500005];
ll ec[500005],dp[3005][5005],sum[500005],ans;
int get(int x){
	if(x==f[x])return x;
	return f[x]=get(f[x]);
}
void add(int x,int y){
	Next[++tot]=head[x];head[x]=tot;ver[tot]=y;
}
void add1(int x,int y){
	Next1[++tot1]=head1[x];head1[x]=tot1;ver1[tot1]=y;
}
void dfs1(int pre,int x){
	vis[x]=1;
	dfn[x]=++totn;low[x]=totn;
	for(int i=head[x];i;i=Next[i]){
		if(ver[i]==pre)continue;
		if(vis[ver[i]]==0){
			dfs1(x,ver[i]);
			low[x]=min(low[x],low[ver[i]]);
		}
		else{
			low[x]=min(low[x],dfn[ver[i]]);
		}
		if(low[ver[i]]>dfn[x]){
			if(i%2==1)br[i]=br[i+1]=1;
			else br[i]=br[i-1]=1;
		}
	}
}
void dft(int pre,int x){
	c[x]=res; sum[res]++;
	for(int i=head[x];i;i=Next[i]){
		if(br[i]==1)continue;
		if(ver[i]==pre)continue;
		if(c[ver[i]]==0)dft(x,ver[i]);
	}
}
void dfs(int pre,int x){
	dp[x][0]=ec[sum[x]]-1+P; dp[x][0]%=P;
	for(int i=head1[x];i;i=Next1[i]){
		//printf("%d %d %d\n",x,i,ver1[i]);
		if(ver1[i]==pre)continue;
		dfs(x,ver1[i]);
		for(int vx=1;vx<res;vx++){
			for(int vv=0;vv<vx;vv++){
				dp[x][vx]+=(dp[x][vx-vv-1]*dp[ver1[i]][vv])%P;
				dp[x][vx]%=P;
			}
		}
	}
	for(int i=0;i<res;i++){
		ans+=(ec[m-i]*dp[x][i])%P;
		ans%=P;
	}
}
int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%lld%lld",&n,&m);
	ec[0]=1;
	for(int i=1;i<=m;i++)ec[i]=(ec[i-1]*2)%P;
	for(int i=1;i<=n;i++)f[i]=i;
	for(int i=1;i<=m;i++){
		int x,y;scanf("%d%d",&x,&y);
		add(x,y);add(y,x);
	}
	dfs1(0,1);
	for(int i=1;i<=n;i++){
		if(c[i]==0){
			res++;dft(0,i);
		}
	}
	for(int i=1;i<=n;i++){
		for(int j=head[i];j;j=Next[j]){
			int x=get(c[i]),y=get(c[ver[j]]);
			if(x==y)continue;
			add1(c[i],c[ver[j]]);
			add1(c[ver[j]],c[i]);
			f[x]=y;
		}
	}
	dfs(0,1);
	printf("%lld",ans%P);
	return 0;
}
/*
5 5
1 2
2 3
3 4
2 4
1 5
*/
