#include<bits/stdc++.h>
#define int long long
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define x first
#define y second
#define vi vector<int>
#define vpi vector<pii>
using namespace std;

inline void ckmin(int &a,int b){a=(a<b?a:b);}
inline void ckmax(int &a,int b){a=(a>b?a:b);}
inline int read()
{
	int f=1,num=0;char ch=getchar();
	while(!(ch=='-'||(ch<='9'&&ch>='0')))ch=getchar();
	if (ch=='-')f=-1,ch=getchar();
	while(ch<='9'&&ch>='0')num=num*10+ch-'0',ch=getchar();
	return num*f;
}

const int Mod=1e9+7;
const int inv2=(Mod+1)/2;
const int M=5e5+10;
int n,m,ans,dp[M],vis[M],dfn[M],low[M],ti,st[M],top,col[M],val[M],cnt,pw2[M];
vi e[M],e2[M];

int poww(int a,int b=Mod-2)
{
	int res=1;
	while(b)
	{
		if (b&1)res=res*a%Mod;
		a=a*a%Mod,b>>=1;
	}return res;
}

void tarjan(int u,int fa)
{
	low[u]=dfn[u]=++ti,st[++top]=u,vis[u]=1;
	for (auto v:e[u])
	{
		if (v==fa)continue;
		if (!dfn[v])
			tarjan(v,u),ckmin(low[u],low[v]);
		else if (vis[v])ckmin(low[u],low[v]);
	}
	if (dfn[u]==low[u])
	{
		cnt++;
		while(st[top]!=u)
			col[st[top]]=cnt,val[cnt]++,vis[st[top]]=0,top--;
		col[st[top]]=cnt,val[cnt]++,vis[st[top]]=0,top--;
	}
}

void dfs(int u,int fa=0)
{
	vi tmp(3);
	tmp[0]=1,tmp[1]=pw2[val[u]]-1;
	for (auto v:e2[u])
	{
		if (fa==v)continue;
		dfs(v,u);
		vi qwq=tmp;
		for (int i=0;i<3;i++)qwq[min(2ll,i+1)]=(qwq[min(2ll,i+1)]+inv2*dp[v]%Mod*tmp[i])%Mod;
		tmp=qwq;
	}
	ans=(ans+tmp[2]+pw2[val[u]]-1)%Mod;
//	cerr<<u<<' '<<ans<<'\n';
	dp[u]=(tmp[1]+tmp[2])%Mod;
}

signed main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	n=read(),m=read();
	pw2[0]=1;
	for (int i=1;i<=n;i++)pw2[i]=pw2[i-1]*2%Mod;
	for (int i=1;i<=m;i++)
	{
		int u=read(),v=read();
		e[u].pb(v),e[v].pb(u);
	}
	tarjan(1,0);int tot=0;
	for (int i=1;i<=n;i++)for (auto x:e[i])
		if (col[x]!=col[i])tot++,e2[col[x]].pb(col[i]);//,cerr<<col[x]<<'E'<<col[i]<<'\n';
	dfs(1);
	cout<<ans*poww(2,m)%Mod<<'\n';
	return 0;
}
