
#include<bits/stdc++.h>
using namespace std;
struct node{
	int v,nt;
}e[200003];
int h[200003],tot;
void add(int x,int y){
	tot++;
	e[tot].v=y;
	e[tot].nt=h[x];
	h[x]=tot;
}
int d[200003],fa[200003];
bool vis[200003];
int dp[200003];
void dfs0(int x){
	vis[x]=1;
	dp[x]=x;
	for(int i=h[x];i;i=e[i].nt)if(!vis[e[i].v]){
		d[e[i].v]=d[x]+1;
		fa[e[i].v]=x;
		dfs0(e[i].v);
		if(d[dp[e[i].v]]<d[dp[x]]) dp[x]=dp[e[i].v];
	}
	else if(e[i].v!=fa[x] && d[dp[e[i].v]]<d[dp[x]]){
		dp[x]=dp[e[i].v];
	}
}
int n,m;
int val[200003];
int vis2[200003];
/*
xian qiu chu suo you zi shu
zhao dao di yi ge da yu ta de zi shu.
*/
long long mod=1e9+7;
/*
ans i = \prod(ans son+1) * 2^|x|
*/
long long qpow(long long a,int b){
	long long base=a,res=1;
	while(b){
		if(b&1) res=res*base%mod;
		base=base*base%mod;
		b=b/2;
	}
	return res;
}
long long res=0;
int sum[2000003];
long long ans0[200003],ans1[200003],ans2[200003];
void count(int x){
	vis[x]=1;
	sum[x]=1;
	ans0[x]=(qpow(2,val[x])-1+mod)%mod;
	ans2[x]=1;
	for(int i=h[x];i;i=e[i].nt) if(!vis[e[i].v]){
	count(e[i].v);
	ans2[x]=ans2[x]*ans2[e[i].v]%mod*2ll%mod;
	ans0[x]=ans0[x]*((ans2[e[i].v]*2ll%mod+ans1[e[i].v])%mod)%mod;
	ans1[x]=(ans1[x]+2ll*ans1[e[i].v]%mod)%mod;
	sum[x]=(sum[x]+sum[e[i].v])%mod;
	}
	ans1[x]=(ans1[x]+ans0[x])%mod;
	res=(res+ans0[x]*qpow(2,n-sum[x])%mod)%mod;
}
/*
1 2 1
3  2
xian kao lv,
zhe ge dian shi zui ding ceng de jun ying
na me da an wei:
wai mian de bian shu*\prod(sonxiamianmeiyoujunyingzhiyoubian+(son xia mian bu yi ding you jun ying dan wai mian mei you bian))

qi zhong,di er ge de qiu fa shi,
ans=+\sum atleast(son)

ans 0// it must be
ans 1// at least 1
ans 0 = (2^|x| - 1)*\prod(2^|son|+ans1)
ans 1 = ans0+\sum ans 1
*/
int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	cin>>n>>m;
	for(int i=1;i<=m;i++) {
		int u,v;
		scanf("%d%d",&u,&v);
		add(u,v);
		add(v,u);
	}
	d[1]=0;
	fa[1]=0;
	dfs0(1);
	memset(h,0,sizeof(h));
	tot=0;
	for(int i=1;i<=n;i++) {
	val[dp[i]]++;
	if(i==dp[i] && fa[i]){
		add(dp[fa[i]],i);
		add(i,dp[fa[i]]);
	}	
	}
	n=tot/2+1;
	memset(vis,0,sizeof(vis));
	count(1);
	printf("%lld",1ll*res*qpow(2,m-n+1)%mod);
}
/*
*/
