#include <cstdio>
#include <iostream>

const int Maxn=5e5+7;
const int Maxm=1e6+7;
const int Mod=1e9+7;

struct Edge
{
	int nxt,to,del;
}e[Maxm<<1];

int edge_cnt=1,head[Maxn];

inline void add_edge(int u,int v)
{
	e[++edge_cnt].to=v;
	e[edge_cnt].nxt=head[u];
	head[u]=edge_cnt;
}

int sel[Maxn],n,m;
int vis[Maxn],cnt,res=0;

void check(int u)
{
	vis[u]=true;
	cnt+=sel[u];
	
	for(int i=head[u];i;i=e[i].nxt)
	{
		int v=e[i].to;
		
		if(e[i].del||vis[v])
			continue;
		
		check(v);
	}
}

int pw[Maxn];
int f[Maxn],siz[Maxn];

inline int fpm(int a,int b)
{
	int res=1;
	
	while(b)
	{
		if(b&1)
			res=1LL*res*a%Mod;
		
		a=1LL*a*a%Mod;
		b>>=1;
	}
	
	return res;
}

void DFS(int u,int fa)
{
	siz[u]+=1;
	
	for(int i=head[u];i;i=e[i].nxt)
	{
		int v=e[i].to;
		
		if(v==fa)
			continue;
		
		DFS(v,u);
		siz[u]+=siz[v];
	}
}

void DP(int u,int fa)
{
	if(siz[u]==1)
	{
		f[u]=1;
		return;
	}
	
	int p=1;
	
	for(int i=head[u];i;i=e[i].nxt)
	{
		int v=e[i].to;
		if(v==fa)
			continue;
		
		DP(v,u);
		f[u]=(f[u]+1LL*f[v]*fpm(2,siz[u]-siz[i])%Mod)%Mod;
		p=1LL*p*(1LL*f[v]*fpm(2,siz[v])%Mod+1)%Mod;
	}
	
	f[u]=(f[u]+1LL*p*fpm(2,siz[u]-1)%Mod)%Mod;
}

int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	
	scanf("%d%d",&n,&m);
	
	for(int i=1;i<=m;++i)
	{
		int u,v;
		scanf("%d%d",&u,&v);
		add_edge(u,v),add_edge(v,u);
	}
	
	if(m==n-1&&n>25)
	{
		DFS(1,0);
		DP(1,0);
		printf("%d\n",f[1]);
	}
	
	pw[0]=1;
	
	for(int i=1;i<=m+1;++i)
		pw[i]=2LL*pw[i-1]%Mod;

	for(int s=1;s<(1<<n);++s)
	{
		int siz=0;
		
		for(int i=1;i<=n;++i)
		{
			sel[i]=((s>>(i-1))&1);
			siz+=sel[i];
		}
		
		int k=m;
		
		for(int i=2;i<=edge_cnt;i+=2)
		{
			e[i].del=e[i^1].del=1;
			cnt=0;
			int r=0;
			for(int i=1;i<=n;++i)
			{
				if(sel[i])
					r=i;
				vis[i]=0;
			}
			check(r);
			if(cnt!=siz)
				--k;
			e[i].del=e[i^1].del=0;
		}
		
		res=(res+pw[k])%Mod;
	}
	
	printf("%d\n",res);
}