#include<bits/stdc++.h>
using namespace std;

constexpr int maxn=500010;
constexpr long long mod=1000000007,inv2=(mod+1)/2;

vector<int>g[maxn],G[maxn];
long long pw[maxn*2],dp[maxn],dq[maxn],ans;
int ti,cnt,top,stk[maxn],low[maxn],dfn[maxn],own[maxn],sz[maxn];

void tarjan(int id,int fa)
{
	low[id]=dfn[id]=++ti;
	stk[++top]=id;
	for(int to:g[id])
	{
		if(to!=fa)
		{
			if(!dfn[to])
			{
				tarjan(to,id);
				low[id]=min(low[id],low[to]);
			}
			else low[id]=min(low[id],dfn[to]);
		}
	}
	if(low[id]==dfn[id])
	{
		int now;
		cnt++;
		do
		{
			now=stk[top--];
			own[now]=cnt;
			sz[cnt]++;
		}while(now!=id);
	}
}

void dfs(int id,int fa)
{
	long long u2=0;
	dp[id]=pw[sz[id]]-1;
	for(int to:G[id])
	{
		if(to!=fa)
		{
			dfs(to,id);
			dp[to]=dp[to]*inv2%mod;
			dq[to]=dq[to]*inv2%mod;
			dp[id]=(dp[id]*(1+dp[to]+dq[to]))%mod;
			u2=(u2+dq[id])*(dp[to]+dq[to])%mod;
			dq[id]=(dq[id]+dp[to]+dq[to])%mod;
		}
	}
	dp[id]=(dp[id]+u2)%mod;
	ans=(ans+dp[id])%mod;
}

int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	int i,n,m,u,v;
	scanf("%d%d",&n,&m);
	for(i=1;i<=m;i++)
	{
		scanf("%d%d",&u,&v);
		g[u].push_back(v);
		g[v].push_back(u);
	}
	pw[0]=1;
	for(i=1;i<=n||i<=m;i++) pw[i]=pw[i-1]*2%mod;
	tarjan(1,0);
	for(i=1;i<=n;i++)
	{
		for(int to:g[i])
		{
			if(own[i]!=own[to])
			{
				G[own[i]].push_back(own[to]);
			}
		}
	}
	dfs(1,0);
	printf("%lld\n",ans*pw[m]%mod);
	return 0;
}