#include<iostream>
#include<algorithm>
#include<cstring>
#include<vector>
#define MAXM 1000000*5
#define MAXN 100000*6
#define ull unsigned long long
using namespace std;
inline int read()
{
	char c=getchar();
	int x=0;
	while(c<'0'||c>'9') c=getchar();
	while(c>='0'&&c<='9')
	{
		x=x*10+c-'0';
		c=getchar();
	}
	return x;
}
const int mod=1000000007;
struct EDGE
{
	int from,to,dis;
}Edge[MAXM];
int thead[MAXN],tnxt[MAXM],cnt=0;

int head[MAXN],nxt[MAXM];
void add_Edge(int f,int t,int dis)
{
	cnt++;
	Edge[cnt]=(EDGE){f,t,dis};
	nxt[cnt]=head[f];
	head[f]=cnt;
}

void add_edget(int f,int t,int dis)
{
	cnt++;
	Edge[cnt]=(EDGE){f,t,dis};
	tnxt[cnt]=thead[f];
	thead[f]=cnt;
}
ull postc[MAXN];
ull dp[MAXN][2];
void solve(int p,int fa)
{
	dp[p][0]=0;dp[p][1]=postc[p];
	int pc,k=1;
	for(int i = thead[p] ; i ; i=tnxt[i])
	{
		pc=Edge[i].to;
		if(pc == fa) continue;
		k=0;
		solve(pc,p);
	}
	if(k) return;
	ull sum1=0,sum2=1;
	for(int i = thead[p] ; i ; i=tnxt[i])
	{
		pc=Edge[i].to;
		if(pc == fa) continue;
		sum1=(sum1+dp[pc][0]+dp[pc][1])%mod;
		sum2=(sum2*(dp[pc][1]+1))%mod;
	}
	dp[p][0]=sum1;
	dp[p][1]=(sum2*(postc[p]))%mod;
}

int dfs_cnt=1,low[MAXN],pre[MAXN];
int pcolor[MAXN],ncl=1;
bool bridge[MAXM];
void tajian(int u,int fa,int ito)
{
	low[u]=pre[u]=dfs_cnt++;
	int cu,ifa=0;
	for(int i=head[u];i;i=nxt[i])
	{
		cu=Edge[i].to;
		if(cu == fa)
		{
			ifa=i;
			continue;
		}
		if(pre[cu]) 
		{
			low[u]=min(pre[cu],low[u]);continue;
		}
		tajian(cu,u,i);
		low[u]=min(low[cu],low[u]);
	}
	if(low[u]==pre[u])
	{
		bridge[ito]=bridge[ifa]=1;
	}
}
bool visitp[MAXN],visite[MAXM];
int qen[MAXN],qnn[MAXN];
void dfs(int u)
{
	if(visitp[u])return;
	visitp[u]=1;
	qnn[low[u]]++;
	int cu;
	for(int i=head[u];i;i=nxt[i])
	{
		cu=Edge[i].to;
		if(bridge[i])
		{
			add_edget(low[u],low[cu],1);
			continue;
		}
		if(!visite[i] && (!bridge[i]))
		{
			qen[low[cu]]++;visite[i]=1;
			
		}
		if(!visitp[cu] &&(low[cu] == low[u])) dfs(cu);
		
	}
}
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	int n,m;
	n=read();m=read();
	if(m== n-1)
	{
			int v1,v2;
		for(int j=0;j<m;j++)
		{
			v1=read();v2=read();
			add_edget(v1,v2,1);
			add_edget(v2,v1,1);
		}
		for(int i=1;i<=n;i++)
		{
			if(m == n-1) postc[i]=1;
		}
		solve(1,1);
		printf("%llu",(dp[1][0]+dp[1][1]-1)%mod);
		return 0;
	}
	int v1,v2;
	for(int j=0;j<m;j++)
	{
		v1=read();v2=read();
		add_Edge(v1,v2,1);
		add_Edge(v2,v1,1);
	}
	tajian(1,1,0);
	for(int i=1;i<=n;i++)
	{
		dfs(i);
	}
	for(int i=1;i<=n;i++)
	{
		postc[low[i]]=( ( (1<<qnn[low[i]])%mod )*( ( 1<<(qen[low[i]]/2) )%mod ) )%mod;
		if(m == n-1) postc[i]=1;
	}
	solve(low[1],low[1]);
	printf("%llu",(dp[1][0]+dp[1][1]-1)%mod);
	return 0;
}
