#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std;
const int N=5e5+10,M=4e6+10,mod=1e9+7;
int din[N],G[N],g[N],f[N],rh[N],id[N],h[N],idx,n,m,cnt[N],scc_cnt,siz[N],stk[N],top,dfn[N],low[N],tim;bool ins[N];
struct edge{int v,nex;}e[M];
vector<int>qy[N];
void add(int h[],int u,int v){e[++idx]=edge{v,h[u]};h[u]=idx;}
void dfs(int u,int fa)
{
	dfn[u]=low[u]=++tim;stk[++top]=u;ins[u]=true;
	for(int i=h[u];i;i=e[i].nex)
	{
		int v=e[i].v;if(v==fa) continue;
		if(!dfn[v]) dfs(v,u),low[u]=min(low[u],low[v]);
		else if(ins[v]) low[u]=min(low[u],dfn[v]);
	}
	if(dfn[u]==low[u])
	{
		scc_cnt++;int y;
		do{
			ins[y=stk[top--]]=false;
			id[y]=scc_cnt;siz[scc_cnt]++;
		} while(y!=u);
	}
}
int mul(int a,int b){int res=1;while(b) ((b&1)&&(res=1ll*res*a%mod),0),a=1ll*a*a%mod,b>>=1;return res;}
int count(int x){int res=0;while(x) res++,x-=x&-x;return res;}
void solve(int u,int fa)
{
	int val=1ll*(mul(2,siz[u])-1)*mul(2,cnt[u])%mod;
//	printf("%d %d %d %d\n",u,siz[u],cnt[u],val);
    int  tt=cnt[u];
	for(int i=rh[u];i;i=e[i].nex)
	{
		int v=e[i].v;if(v==fa) continue;solve(v,u);
		cnt[u]=(cnt[u]+cnt[v]+1)%mod;
		g[u]=(g[u]+1ll*g[v]*mul(2,tt+1)%mod)%mod;
		G[u]=(G[u]+G[v])%mod;
		qy[u].push_back(v);
	}
	int p=qy[u].size();
	if(!p) return f[u]=g[u]=G[u]=val,void();
//	printf("%d %d %d\n",u,cnt[u],val);
	for(int i=0;i<(1<<p);i++) //1
	{
		int tmp=1;
		for(int j=0;j<p;j++)
		{
			int v=qy[u][j];
			if((i>>j)&1) tmp=1ll*tmp*G[v]%mod;
			else tmp=1ll*tmp*mul(2,cnt[v]+1)%mod;
//			printf("%d %d %d\n",v,f[v],cnt[v]);
		}
		f[u]=(f[u]+1ll*tmp*val%mod)%mod;
	}
//	printf("%d %d\n",u,f[u]);
    g[u]=(g[u]+f[u])%mod;
    G[u]=(G[u]+f[u])%mod;
	for(int i=1;i<(1<<p);i++) //0
	{
		int tmp=1,vv;
		for(int j=0;j<p;j++)
		{
			int v=qy[u][j];
			if((i>>j)&1)
			{
				if(count(i)==1) vv=v,tmp=1ll*tmp*g[v]%mod;
				else tmp=1ll*tmp*G[v]%mod;
			}
			else tmp=1ll*tmp*mul(2,cnt[v]+1)%mod;
	    }
	    if(count(i)==1) tmp=1ll*g[vv]*mul(2,cnt[u]-cnt[vv])%mod;
	    else tmp=1ll*tmp*mul(2,tt)%mod;
//	    if(p==2) printf("NLC:%d\n",tmp);
		f[u]=(f[u]+tmp)%mod;
	}
//	printf("%d %d %d %d\n",u,f[u],g[u],G[u]);
}
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);for(int u,v,i=1;i<=m;i++) scanf("%d%d",&u,&v),add(h,u,v),add(h,v,u);dfs(1,0);
//	for(int i=1;i<=n;i++) printf("%d ",id[i]);puts("");
//    printf("%d\n",scc_cnt);
    int tmp=idx;
	for(int i=1;i<tmp;i+=2)
	{
		int u=e[i].v,v=e[i+1].v;
		if(id[u]==id[v]) cnt[id[u]]++;
		else add(rh,id[u],id[v]),add(rh,id[v],id[u]),din[id[u]]++,din[id[v]]++;
	}
	solve(1,0);
//	for(int i=1;i<=scc_cnt;i++) if(din[i]!=2) printf("%d %d\n",din[i],i);
	printf("%d\n",f[1]);
	return 0;
}