#include <bits/stdc++.h>
#define F(i,f,t) for(int i=(f),_end=(t);i<=_end;i++)
#define D(i,f,t) for(int i=(f),_end=(t);i>=_end;i--)
#define int long long
using namespace std;

template<typename T>
void re(T&a) {
	char c;
	T f=1;a=0;
	while(c=getchar(),!isdigit(c)) if(c=='-') f=-1;
	while(isdigit(c)) a=a*10+c-'0',c=getchar();
	a*=f;
}
template<typename T,typename ...Arg>
void re(T&a,Arg&...arg) {
	re(a),re(arg...);
}
const int N=6e5,M=2000000,md=1e9+7,i2=5e8+4;
typedef int intn[N],intm[M];
int n,m;
vector<int>e[N],e2[N];
intn bl,dfn,low,sz;
int p2[M];
void tarjan(int u,int p) {
	static int ct=0,st[N],tp=0;
	dfn[u]=low[u]=++ct,st[++tp]=u;
	for(int v:e[u])
		if(v!=p) {
			if(!dfn[v]) tarjan(v,u),low[u]=min(low[u],low[v]);
			else low[u]=min(low[u],dfn[v]);
		}
	if(dfn[u]==low[u]) {
		int v;
		do v=st[tp--],bl[v]=u,sz[u]++; while(v!=u);
	}
}
int f[3][N];
void dfs(int u,int p) {
	f[2][u]=i2,f[1][u]=(md+p2[sz[u]]-1)%md*i2%md;
	bool lf=1;
	for(int v:e2[u]) {
		if(v==p) continue;
		dfs(v,u),lf=0;
		(f[1][u]*=(f[1][v]+f[2][v]+1)%md)%=md;
		(f[2][u]*=(f[1][v]+f[2][v]+1)%md)%=md;
	}
	if(lf) f[2][u]=0;
	else (f[2][u]+=md-i2)%=md;
}

signed main() {
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	re(n,m);
	p2[0]=1;
	F(i,1,max(n,m+1)) p2[i]=(p2[i-1]<<1)%md;
	F(i,1,m) {
		int u,v;
		re(u,v);
		e[u].emplace_back(v);
		e[v].emplace_back(u);
	}		
	tarjan(1,0);
	F(u,1,n) for(int v:e[u]) {
		if(bl[u]!=bl[v]) e2[bl[u]].emplace_back(bl[v]);
	}
	dfs(bl[1],0);
	int Ans=0;
	F(i,1,n) if(bl[i]==i) (Ans+=f[1][i])%=md;
	cout<<Ans*p2[m+1]%md;
	return 0;
}
