#include<bits/stdc++.h>
using namespace std;
#define N 500005
#define NN 2000005
#define Mod 1000000007
#define Min(x,y)((x)<(y)?x:y)
#define Max(x,y)((x)>(y)?x:y)
#define For(i,x,y)for(i=x;i<=(y);i++)
struct Edge
{
	int next,to;
}e[NN];
bool cut[NN];
vector<int>vec[N];
int f[N][2],base[NN],siz[N],head[N],low[N],col[N],dfn[N],tot[N],cnt,g=1;
int read()
{
	int A;
	bool K;
	char C;
	C=A=K=0;
	while(C<'0'||C>'9')K|=C=='-',C=getchar();
	while(C>'/'&&C<':')A=(A<<3)+(A<<1)+(C^48),C=getchar();
	return(K?-A:A);
}
void add(int u,int v)
{
	e[++g].to=v;
	e[g].next=head[u];
	head[u]=g;
}
void tarjan(int u,int fa)
{
	int i,v;
	dfn[u]=low[u]=++cnt;
	for(i=head[u];i;i=e[i].next)
	{
		v=e[i].to;
		if(v==fa)continue;
		if(!dfn[v])tarjan(v,u),low[u]=Min(low[u],low[v]);
		else low[u]=Min(low[u],dfn[v]);
		if(low[v]>dfn[u])cut[i]=cut[i^1]=1;
	}
}
void dfs(int u)
{
	int i,v;
	tot[col[u]]++;
	for(i=head[u];i;i=e[i].next)
	if(!cut[i])
	{
		v=e[i].to;
		if(!col[v])col[v]=col[u],dfs(v);
	}
}
void dp(int u,int fa)
{
	int i,v,x,y;
	x=y=siz[u]=1;
	For(i,0,signed(vec[u].size())-1)
	{
		v=vec[u][i];
		if(v==fa)continue;
		dp(v,u);
		siz[u]+=siz[v];
		x=((1LL*f[v][0]<<1)+f[v][1])*x%Mod;
		y=1LL*y*(f[v][0]<<1)%Mod;
	}
	f[u][1]=(1LL*x*base[tot[u]]-y+Mod)%Mod;
	f[u][0]=y;
}
signed main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	int n,m,i,u,v,num,tmp,res;
	num=tmp=res=0;
	n=read(),m=read();
	base[0]=1;
	For(i,1,m+3)base[i]=(1LL*base[i-1]<<1)%Mod;
	For(i,1,m)
	{
		u=read(),v=read();
		add(u,v),add(v,u);
	}
	tarjan(1,0);
	For(u,1,n)
	if(!col[u])col[u]=++num,dfs(u);
	For(u,1,n)
	for(i=head[u];i;i=e[i].next)
	if(cut[i])vec[col[u]].push_back(col[e[i].to]);
	else tmp++;
	dp(1,0);
	For(u,1,n)res=(res+1LL*f[u][1]*base[Max(num-1-siz[u],0)])%Mod;
	cout<<1LL*res*base[tmp>>1]%Mod;
	return 0;
}
