#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
using namespace std;
inline int read()
{
	char c=getchar();int x=0,f=1;
	for(;!isdigit(c);c=getchar())if(c=='-')f=-1;
	for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
	return x*f;
}

#define mod 1000000007
struct modint{
	int x;
	modint(int o=0){x=o;}
	modint &operator +=(modint o){return x=(x+o.x>=mod?x+o.x-mod:x+o.x),*this;}
	modint &operator -=(modint o){return x=(x-o.x<0?x-o.x+mod:x-o.x),*this;}
	modint &operator *=(modint o){return x=1ll*x*o.x%mod,*this;}
	friend modint operator +(modint a,modint b){return a+=b;}
	friend modint operator -(modint a,modint b){return a-=b;}
	friend modint operator *(modint a,modint b){return a*=b;}
};

#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;

#define maxn 1000005
#define inf 0x3f3f3f3f
#define ull unsigned long long

int n,m;
struct edge{
	int to,nxt;
}e[maxn<<2];
int head[maxn],tot=1;
inline void adde(int u,int v){
	e[++tot]=(edge){v,head[u]};
	head[u]=tot;
}

int idx,dfn[maxn],low[maxn],upe[maxn];
bool cut[maxn<<2];
modint pw[maxn];
void tar(int u,int pa){
	dfn[u]=low[u]=++idx;
	for(int i=head[u];i;i=e[i].nxt){
		int v=e[i].to;
		if(v==pa)continue;
		upe[v]=i;
		if(!dfn[v]){
			tar(v,u);
			low[u]=min(low[u],low[v]);
			if(low[v]==dfn[v]) cut[i]=cut[i^1]=1;
		}
		else low[u]=min(low[u],dfn[v]);
	}
}

int col[maxn],cnt,siz[maxn];
void dfs(int u){
	col[u]=cnt,++siz[cnt];
	for(int i=head[u];i;i=e[i].nxt){
		int v=e[i].to;
		if(cut[i]||col[v])continue;
		dfs(v);
	}
}

vi g[maxn];

modint f[maxn][3],res;
modint inv2=(mod+1)/2;
void dfs(int u,int pa)
{
	f[u][0]=1;
	for(int v:g[u]){
		if(v==pa)continue;
		dfs(v,u);
		Rep(i,2,0) f[u][min(2,i+1)]+=f[u][i]*(f[v][1]+f[v][2]);
	}
//	cout<<u<<" "<<f[u][0].x<<" "<<f[u][1].x<<" "<<f[u][2].x<<"\n";
	res+=f[u][2]*(pw[siz[u]]);
	res+=(f[u][0]+f[u][1])*(pw[siz[u]]-1);
	Rep(i,2,0) f[u][min(2,i+1)]+=f[u][i]*(pw[siz[u]]-1);
	f[u][1]*=inv2;
	f[u][2]*=inv2;
}

signed main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	n=read(),m=read();
	For(i,1,m){
		int u=read(),v=read();
		adde(u,v),adde(v,u);
	}
	tar(1,0);
	pw[0]=1;
	For(i,1,max(n,m))pw[i]=pw[i-1]*2;
	For(i,1,n)if(!col[i])++cnt,dfs(i);
	for(int i=2;i<=tot;i+=2)
		if(cut[i]){
			int u=e[i].to,v=e[i^1].to;
			g[col[u]].pb(col[v]);
			g[col[v]].pb(col[u]);
		}
	dfs(1,0);
	For(i,1,m)res*=2;
	cout<<res.x;
	return 0;
}
