#include<iostream>
#include<cstdio>
#include<cstring>
#define int long long
using namespace std;
const int N=5e5+5,M=1e6+5,P=1e9+7;
int T,n,m,u[M],v[M],vis[N];
int tot,head[N],Next[M<<1],vet[M<<1];
int read(int& v)
{
	char ch; int f=1;
	for(ch='*';!isdigit(ch) && ch!='-';ch=getchar());
	if(ch=='-')  f=-1,ch=getchar();
	for(v=0;isdigit(ch);v=v*10+ch-'0',ch=getchar());
	v*=f;
return v;
}
void add(int a,int b)
{
	Next[++tot]=head[a];
	vet[tot]=b;
	head[a]=tot;
}
namespace sub1
{
	const int K=20;
	int ans=0,mark[N];
	int get_cnt(int fa,int u,int banu,int banv)
	{
		if(mark[u])  return 0;
		mark[u]=1;
		int cnt=vis[u];
		for(int i=head[u];i;i=Next[i])
		{
			int v=vet[i];
			if(v==fa)  continue;
			if(u==banu && v==banv)  continue;
			if(v==banu && u==banv)  continue;
			cnt+=get_cnt(u,v,banu,banv);
		}
		return cnt;
	}
	int get_ans(int num)
	{
		if(!num)  return 0;
		int cnt=0,pos=1;
		for(int i=1;i<=n;i++)  if(vis[i])  pos=i;
		for(int i=1;i<=m;i++)
		{
			fill(mark+1,mark+1+n,0);
			if(get_cnt(-1,pos,u[i],v[i])==num)  cnt++;
		}
		return (1<<cnt)%P;
	}
	void dfs(int p,int num)
	{
		if(p==n+1){ ans=(ans+get_ans(num))%P; return; }
		vis[p]=1,dfs(p+1,num+1);
		vis[p]=0,dfs(p+1,num);
	}
	void main()
	{
		dfs(1,0);
		printf("%lld\n",ans);
	}
}
namespace sub2
{
	int d[N],siz[N];
	int power(int a,int b)
	{
		int rec=1;
		for(;b;b>>=1,a=a*a%P)
			if(b&1)  rec=rec*a%P;
		return rec;
	}
	void dfs(int fa,int u,int dep)
	{
		d[u]=dep,siz[u]=1;
		for(int i=head[u];i;i=Next[i])
		{
			int v=vet[i];
			if(v==fa)  continue;
			dfs(u,v,dep+1);
			siz[u]+=siz[v];
		}
	}
	void main()
	{
		dfs(-1,1,0);
		int ans=0;
		for(int i=1;i<=m;i++)
		{
			if(d[u[i]]>d[v[i]])  swap(u[i],v[i]);
			int sizu=n-siz[v[i]],sizv=siz[v[i]];
			ans=(ans+power(2,sizu)-1+P)%P;
			ans=(ans+power(2,sizv)-1+P)%P;
		}
		printf("%lld\n",ans);
	}
}
void solve()
{
	read(n),read(m);
	for(int i=1;i<=m;i++)
	{
		read(u[i]),read(v[i]);
		add(u[i],v[i]),add(v[i],u[i]);
	}
	sub1::main();
//	if(m==n-1){ sub2::main(); return; }
}
signed main()
{
	freopen("match.in","r",stdin);
	freopen("match.out","w",stdout);
	/*read(T);
	while(T--)*/  solve();
return 0;
}