#include <bits/stdc++.h>
using namespace std;
const int N=2e6+5,P=1e9+7;
int to[N],nx[N],head[N],pw[N],c,abl,unbl;
bool ck[N],mk[N];
long long ans=0;
int n,m;
void add(int a,int b)
{
	to[++c]=b,nx[c]=head[a],head[a]=c;
}
void dfs(int x)
{
	if(ck[x]) return ;
	ck[x]=1;
//	printf("%lld %d %d----\n",ans,x,mk[x]);
	if(mk[x]) abl++;
	for(int i=head[x];i;i=nx[i])
	{
		if((i+1)/2==unbl) continue;
//		printf("%d %lld---\n",to[i],ans);
		dfs(to[i]);
	}
}
void slv10()
{
	pw[0]=1;
	for(int i=1;i<=1e6;i++)
	{
		pw[i]=pw[i-1]*2%P;
	}
	ans=1ll*n*pw[m]%P;
	for(int i=2;i<=n;i++)
	{
		ans+=1ll*(n+1-i)*pw[i-2]%P*pw[m+1-i]%P;
	}
	printf("%lld",ans%P);
}
void slv()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)
	{
		int a,b;
		scanf("%d%d",&a,&b);
		add(a,b);
		add(b,a);
	}
	if(n>16)
	{
		slv10();
		return ;
	}
	for(int i=1;i<(1<<n);i++)
	{
		int cc=0,bg;
		for(int j=1;j<=n;j++)
		{
			mk[j]=((i&(1<<j-1))>0);
			if(i&(1<<j-1))
			{
				cc++;
				bg=j;
			}
		}
//		printf("%d %d %d\n",i,cc,bg);
		int nd=0;
		for(unbl=1;unbl<=m;unbl++)
		{
			for(int k=1;k<=n;k++)
			{
				ck[k]=0;
			}
			abl=0;
			dfs(bg);
			if(abl<cc) nd++;
		}
//		printf("%d %d\n",i,nd);
		ans+=1<<(m-nd);
	}
	printf("%lld",ans%P);
}
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	slv();
	fclose(stdin);
	fclose(stdout);
	return 0;
}
