#include<bits/stdc++.h>
#define For(i,j,k) for(int i=(j);i<=(k);i++)
#define foR(i,j,k) for(int i=(j);i>=(k);i--)
#define mst(a,b) memset(a,b,sizeof(a)); 
#define vi vector<int>
#define mkp make_pair
#define pii pair<int,int>
#define SZ(x) ((int)x.size())
#define pb push_back
using namespace std;
int read() { int x; scanf("%d",&x); return x; }
const int P=1e9+7; 
int add(int x,int y) { return (x+y)%P; }
int sub(int x,int y) { return (x-y+P)%P; }
int mul(int x,int y) { return 1ull*x*y%P; }
void addmod(int &x,int y) { x=add(x,y); }
void submod(int &x,int y) { x=sub(x,y); }
void mulmod(int &x,int y) { x=mul(x,y); }
void ckmin(int &x,int y) { x=min(x,y); } 
void fprint(int *a,int n) {For(i,1,n) fprintf(stderr,"%d%c",a[i]," \n"[i==n]); }
const int MN=2e6+5,iv2=(P+1)/2; 
int pw[MN]; 
void init(int n=MN-2) { pw[0]=1; For(i,1,n) pw[i]=mul(pw[i-1],2); }
vi g[MN],e[MN];
int n,m,stk[MN],top,scnt,siz[MN],U[MN],V[MN],bel[MN],low[MN],dfn[MN],ind; map<pii,int>mp; 
void tarjan(int u,int fa) {
	low[u]=dfn[u]=++ind; stk[++top]=u;  
	for(auto i:g[u]) {
		int v=U[i]+V[i]-u;
		if(v==fa) continue; 
		if(!dfn[v]) {
			tarjan(v,u); 
			if(low[v]==dfn[v]) {
				++scnt; 
				while(stk[top]!=v) siz[bel[stk[top--]]=scnt]++; 
				siz[bel[stk[top--]]=scnt]++; 
			}
			ckmin(low[u],low[v]); 
		} else if(dfn[v]<dfn[u]) ckmin(low[u],low[v]); 
	}
}
int f[MN],h[MN]; 
void dfs(int u,int fa) {
	f[u]=sub(pw[siz[u]],1),h[u]=1;
	for(auto v:e[u]) {
		if(v==fa) continue; dfs(v,u);
		mulmod(f[u],add(mul(iv2,add(f[v],h[v])),1)); 
		mulmod(h[u],add(mul(iv2,add(f[v],h[v])),1)); 
	}
	submod(h[u],1); 
}
void works() {
	n=read(),m=read();
	For(i,1,m) {
		U[i]=read(),V[i]=read(); 
		g[U[i]].pb(i),g[V[i]].pb(i); 
	}
	tarjan(1,0); 
	
	++scnt; 
	while(top) siz[bel[stk[top--]]=scnt]++; 
	n=scnt; 
	For(i,1,m) {
		pii it=mkp(min(bel[U[i]],bel[V[i]]),max(bel[U[i]],bel[V[i]])); 
		if(bel[U[i]]!=bel[V[i]]) {
//			if(mp.count(it)) cerr<<U[i]<<' '<<V[i]<<' '<<bel[U[i]]<<' '<<bel[V[i]]<<endl;
			e[bel[U[i]]].pb(bel[V[i]]); 
			e[bel[V[i]]].pb(bel[U[i]]); 
		}
	}
	dfs(1,0); 
	int ans=0; 
	For(i,1,n) addmod(ans,f[i]); 
	printf("%d\n",mul(ans,pw[m])); 
} 
int main() {
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	int T=1; init(); 
	while(T--) {
		works(); 
	}
	return 0; 
}
