#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define up(i,x,y) for(int i=x,i##E=y;i<=i##E;i++)
#define pu(i,x,y) for(int i=x,i##E=y;i>=i##E;i--)
#define up_(x) up(i,1,x)
#define mc cerr<<"qwq\n"
#define edl puts("")
#define pii pair<int,int>
#define mkp make_pair
#define ep push_back
#define vi vector<int>
#define upn up(i,1,n)
#define upm up(j,1,m)
int n,m;
const int maxn=505050*2;
vi v[maxn];
int a[maxn*2],b[maxn*2];
int faa[maxn],is[maxn];
int pw22[maxn];
const int mod=1e9+7;
int find(int x)
{
	return x==faa[x]?faa[x]:faa[x]=find(faa[x]);
}
void merge(int x,int y)
{
	int fx=find(x),fy=find(y);
	if(fx==fy)return;
	faa[fx]=fy;
}
void bf_solve()
{
	int msk1=(1<<n)-1,msk2=(1<<m)-1;
	int ans=0;
	int qw=0;
	up(p,1,msk1)
	{
		qw=0;
		up(q,0,msk2)
		{
			int fl=1;
			up(i,0,n-1)
			{
				if((p>>i)&1)
				{
					is[i+1]=1;
				}
				else is[i+1]=0;
			}
			up(i,0,m-1)
			{
				if(q&(1<<i))continue;
				up(j,1,n)faa[j]=j;
				up(j,0,m-1)
				{
					if(j!=i)merge(a[j+1],b[j+1]);
				}
				int qwq=-1;
				up(j,1,n)
				{
					if(is[j])
					{
//						cout<<j<<" "<<find(j)<<" ";
						if(qwq==-1)qwq=find(j);
						else
						{
							if(qwq!=find(j))
							{
								fl=0;
								break;
							}
						}
					}
				}
				if(!fl)break;
			}
			ans+=fl;
			qw+=fl;
		}
	}
	cout<<ans;edl;
}
int dp[maxn][2],siz[maxn],f[maxn];
void dfs(int x,int fa)
{
	siz[x]=1;
	dp[x][0]=1;
	dp[x][1]=1;
	f[x]=fa;
	int a1=1,a2=1;
	for(auto i:v[x])
	{
		if(i==fa)continue;
		dfs(i,x);
		siz[x]+=siz[i];
		
		
		dp[x][1]=dp[x][1]*(dp[i][0]*2%mod+dp[i][1])%mod;
		dp[x][1]+=dp[x][0]*dp[i][1]%mod;dp[x][1]%=mod;
		dp[x][0]=dp[x][0]*dp[i][0]%mod*2%mod;
	}
}
int qpow(int a,int b)
{
	if(a==2&&b<=500000)return pw22[b];
	int ans=1;
	while(b)
	{
		if(b&1)ans=ans*a%mod;
		a=a*a%mod;
		b>>=1;
	}
	return ans;
}
void bf2_solve()
{
	dfs(1,0);
	int ans=0;
	up(i,1,n)
	{
		int nw=dp[i][1]*qpow(2,n-siz[i])%mod;
		for(auto to:v[i])
		{
			if(to==f[i])continue;
			nw-=dp[to][1]*qpow(2,n-siz[to]-1)%mod;nw+=mod;nw%=mod;
		}
//		cout<<i<<" "<<nw;edl;
		ans+=nw;
		ans%=mod;
	}
	cout<<ans;edl;
}
int numc;
int vis[maxn],sta[maxn],col[maxn],tp;
int dfn[maxn],low[maxn],ft[maxn];
int pw2[maxn];
int cnt;
int sz[maxn];
vi g[maxn];
int tot=0;
inline void tarjan(int x)
{
	dfn[x]=++cnt;low[x]=dfn[x];
	vis[x]=1;sta[++tp]=x;
	for(auto to:v[x])
	{
		if(!dfn[to])
		{
			ft[to]=x;
			tarjan(to);
			low[x]=min(low[x],low[to]);
		}
		else
		{
			if(vis[to]&&to!=ft[x])
			{
				low[x]=min(low[x],dfn[to]);
			}
		}
	}
	if(dfn[x]==low[x])
	{
		++numc;
		col[x]=numc;
		while(sta[tp]!=x)
		{
			col[sta[tp]]=numc;
			--tp;
		}
		--tp;
	}
}
int qqq=0;
int szz[maxn],ftt[maxn];
void dfs2(int x,int fa)
{
	++qqq;
	szz[x]=1;
	dp[x][0]=1;
	ftt[x]=fa;
	dp[x][1]=qpow(2,sz[x])-1;
	for(auto i:g[x])
	{
		if(i==fa)continue;
		dfs2(i,x);
		szz[x]+=szz[i];
		dp[x][1]=dp[x][1]*(dp[i][0]*2%mod+dp[i][1])%mod;
		dp[x][1]+=dp[x][0]*dp[i][1]%mod;dp[x][1]%=mod;
		dp[x][0]=dp[x][0]*dp[i][0]%mod*2%mod;
	}
}
signed main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%lld%lld",&n,&m);
	up(i,1,m)
	{
		int x,y;scanf("%lld%lld",&x,&y);
		v[x].ep(y);v[y].ep(x);
		a[i]=x;b[i]=y;
	}
	pw22[0]=1;
	up(i,1,500000)pw22[i]=pw22[i-1]*2%mod;
	if(n<=8&&m<=10)
	{
		bf_solve();
		return 0;
	}
	if(m==n-1)
	{
		bf2_solve();
		return 0;
	}
//		mc;
	
//	upn
//	{
//		cout<<dfn[i]<<" "<<low[i];edl;
//	}
//	return 0;
	tarjan(1);
//	upn cout<<col[i]<<" ";edl;
	int useless=1;
	up(i,1,n)
	{
		++sz[col[i]];
	}
	up(i,1,m)
	{
		if(col[a[i]]==col[b[i]])
		{
			useless*=2;useless%=mod;
		}
		else
		{
			g[col[a[i]]].ep(col[b[i]]);g[col[b[i]]].ep(col[a[i]]);
			++tot;
//			cout<<a[i]<<" "<<b[i];
		}
	}
	dfs2(1,0);
//	cout<<tot<<" "<<numc<<" "<<qqq;edl;
	int ans=0;
//	up(i,1,numc)
//	{
//		cout<<dp[i][1];edl;
//	}
	up(i,1,numc)
	{
		int nw=dp[i][1]*qpow(2,numc-szz[i])%mod;
		
		for(auto to:g[i])
		{
			if(to==ftt[i])continue;
			nw-=dp[to][1]*qpow(2,numc-szz[to]-1)%mod;nw+=mod;nw%=mod;
		}
//		cout<<i<<" "<<nw;edl;
		ans+=nw;
		ans%=mod;
	}
	ans*=useless;ans%=mod;cout<<ans;
	return 0;
	return 0;
}
/*
4 4
1 2
2 3
3 1
1 4


8 7
1 2
1 3
1 4
2 5
5 6
4 7
3 8
