#include<bits/stdc++.h>
using namespace std;
const int N=1e6+5,mod=1e9+7,Inv2=(mod+1)/2;
int ti,dfn[N],low[N],top,st[N],cnt,id[N],siz[N],pw[N],f[N],n,m;
vector<int> e[N],E[N];
void dfs(int x,int fa){
    dfn[x]=low[x]=++ti;st[++top]=x;
    for(int y:e[x])if(y^fa){
        if(dfn[y])low[x]=min(low[x],dfn[y]);
        else {
        	dfs(y,x);
			low[x]=min(low[x],low[y]);
			if(low[y]>dfn[x]){
				cnt++;
				while(st[top]!=y){
					id[st[top]]=cnt;
					siz[cnt]++;
					top--;
				}
				id[y]=cnt,siz[cnt]++;
				top--;
			}
		}
    }
}
int ans;
void dfs1(int x,int fa){
    int res=pw[siz[x]];
    for(int y:E[x])if(y^fa){
        dfs1(y,x);
        res=1ll*res*(1ll*f[y]*Inv2%mod+1)%mod;
    }
    f[x]=res-1;
    int res1=pw[siz[x]]-1,res2=1;
    for(int y:E[x])if(y^fa){
    	res1=1ll*res1*(1ll*f[y]*Inv2%mod+1)%mod;
    	res2=1ll*res2*(1ll*f[y]*Inv2%mod+1)%mod;
	}
	res2--;
	for(int y:E[x])if(y^fa)res2=(res2-1ll*f[y]*Inv2%mod+mod)%mod;
	ans=((ans+res1)%mod+res2)%mod;
}
int main(){
    freopen("barrack.in","r",stdin);
    freopen("barrack.out","w",stdout);
    ios::sync_with_stdio(0);
    cin>>n>>m;
    for(int i=1,x,y;i<=m;i++){
        cin>>x>>y;
        e[x].push_back(y);
        e[y].push_back(x);
    }
    for(int i=1;i<=n;i++)if(!dfn[i])dfs(i,0);
    if(top){
    	cnt++;
    	for(int i=1;i<=top;i++){
    		id[st[i]]=cnt;
    		siz[cnt]++;
		}
	}
    for(int x=1;x<=n;x++)for(int y:e[x])if(id[x]!=id[y])E[id[x]].push_back(id[y]);
    pw[0]=1;
    for(int i=1;i<=max(n,m);i++)pw[i]=pw[i-1]*2ll%mod;
    dfs1(1,0);
    cout<<1ll*ans*pw[m]%mod;
}
/*
7 8
1 2
1 3
2 7
7 3
3 4
4 5
5 6
3 6
*/