#include<bits/stdc++.h>
#define int long long
using namespace std;
const int Mod=1000000007;
const long long Inv2=(Mod+1)/2;
int n,m,dfn[500005],low[500005],used=0,bel[500005];
int sz=0,sta[500005],oui[500005],non[500005];
vector<int> g[500005],ng[500005];
void tarjan(int rt,int fa)
{
	used++;dfn[rt]=low[rt]=used;
	sz++;sta[sz]=rt;
	for(int i:g[rt])
	{
		if(i==fa)continue;
		if(dfn[i]==0)
		{
			tarjan(i,rt);
			low[rt]=min(low[rt],low[i]);
		}
		else
			low[rt]=min(low[rt],dfn[i]);
	}
	if(low[rt]==dfn[rt])
	{
		for(;sta[sz]!=rt;sz--)
		{
			bel[sta[sz]]=rt;
		}
		bel[rt]=rt;sz--;
	}
}
bool vis[500005][2][2];
int dp[500005][2][2];
long long sufnon[500005];
long long getans(int rt,bool city,bool tob)//with root!
{
	if(vis[rt][city][tob])return dp[rt][city][tob];
	vis[rt][city][tob]=true;
	//printf("vis %d %d %d\n",rt,city,tob);
	if(not city)
	{
		long long ans=non[rt]*2;
		for(int i:ng[rt])
			ans=ans*getans(i,false,tob)%Mod;
		dp[rt][city][tob]=ans;
		return ans;
	}
	if(tob)
	{
		long long Oui=oui[rt],Non=non[rt];
		for(int i:ng[rt])
		{
			Oui=Oui*(getans(i,false,true)+getans(i,true,true))%Mod;
			Non=Non*getans(i,false,true)%Mod;
		}
		dp[rt][city][tob]=(Oui-Non)%Mod;
		return dp[rt][city][tob];
	}
	sufnon[ng[rt].size()]=1;
	for(int i=ng[rt].size()-1;i>=0;i--)
		sufnon[i]=sufnon[i+1]*getans(ng[rt][i],false,true)%Mod;
	long long Non=non[rt],One=0,Oui=oui[rt];
	for(int i=0;i<(int)ng[rt].size();i++)
	{
		One=(One+Non*(getans(ng[rt][i],true,true)-getans(ng[rt][i],true,false))%Mod*sufnon[i+1])%Mod;
		//printf("%lld %lld %lld\n",Non,getans(ng[rt][i],true,true),sufnon[i+1]);
		Oui=Oui*(getans(ng[rt][i],false,true)+getans(ng[rt][i],true,true))%Mod;
		Non=Non*getans(ng[rt][i],false,false)%Mod;
	}
	//printf("rt=%d %lld %lld %lld\n",rt,Non,One,Oui);
	dp[rt][city][tob]=(Oui-One-Non);
	dp[rt][city][tob]*=2;if(dp[rt][city][tob]>=Mod)dp[rt][city][tob]-=Mod;
	return dp[rt][city][tob];
}
signed main()
{
	freopen("barrack.in","r",stdin);
	//freopen("input.txt","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);
	int u,v;
	for(int i=1;i<=m;i++)
	{
		scanf("%d%d",&u,&v);
		g[u].push_back(v);
		g[v].push_back(u);
	}
	tarjan(1,0);
	//for(int i=1;i<=n;i++)printf("%d %d %d\n",dfn[i],low[i],bel[i]);
	for(int i=1;i<=n;i++)oui[i]=non[i]=1;
	for(int i=1;i<=n;i++)
	{
		int bi=bel[i];
		oui[bi]*=2;if(oui[bi]>=Mod)oui[bi]-=Mod;
		for(int j:g[i])
		{
			if(dfn[i]>dfn[j])continue;//every edge should be counted once
			if(bi==bel[j])
			{
				oui[bi]*=2;if(oui[bi]>=Mod)oui[bi]-=Mod;
				non[bi]*=2;if(non[bi]>=Mod)non[bi]-=Mod;
			}
			else
				ng[bi].emplace_back(bel[j]);
		}
	}
//	for(int i=1;i<=n;i++)
//	{
//		printf("%d,%d | ",oui[i],non[i]);
//		for(int j:ng[i])printf("%d ",j);
//		puts("");
//	}
	printf("%lld\n",(Mod+getans(bel[1],true,false)%Mod)*Inv2%Mod);
//	for(int i:{1,4})
//		printf("%d %d %d %d\n",dp[i][0][0],dp[i][0][1],dp[i][1][0],dp[i][1][1]);
	return 0;
}
