#include<bits/stdc++.h>
#define elif else if
#define pc putchar(' ')
#define pn puts("")
#define rep(i,l,r) for(int i=(l),j=(r);i<=j;++i)
#define per(i,r,l) for(int i=(r),j=(l);i>=j;--i)
#define int long long
#define M 1000005
#define N 3005
#define A 0x3f3f3f3f
#define P 1000000007
using namespace std;
int read(){int ret=0,b=1,c=getchar();while(!isdigit(c))b=c=='-'?-1:1,c=getchar();while(isdigit(c))ret=ret*10+c-'0',c=getchar();return ret*b;}
void wr(int x){if(x<0)putchar('-'),x=-x;if(x>9)wr(x/10);putchar(x%10+'0');return;}
void wrc(int x){wr(x),pc;return;}
void wrn(int x){wr(x),pn;return;}
int Min(int x,int y){return x<=y?x:y;}
int Max(int x,int y){return x>=y?x:y;}
void Swap(int &x,int &y){x^=y,y^=x,x^=y;return;}
int n,m,ans,a[M],b[M],cnt;
bool to[N][N],vis[N],flag[N],pr[N];
namespace solve1
{
	void dfs(int x)
	{
		vis[x]=true,cnt-=flag[x];
		rep(i,1,n)
			if(to[x][i]&&!vis[i])
				dfs(i);
		return;
	}
	bool judge()
	{
		
		int z=cnt,f=true;
		for(int i=1;i<=m&&f;++i)
			if(!pr[i])
			{
				to[a[i]][b[i]]=to[b[i]][a[i]]=false;
				rep(t,1,n)
					vis[t]=false;
				cnt=z;
				for(int t=1;t<=n&&f;++t)
				{
					if(!vis[t])
						dfs(t);
					if(cnt!=z&&cnt!=0)
						f=false;
				}
				to[a[i]][b[i]]=to[b[i]][a[i]]=true;
			}
		return f;
	}
	void solve()
	{
		rep(i,1,m)
			a[i]=read(),b[i]=read(),to[a[i]][b[i]]=to[b[i]][a[i]]=true;
		for(int i=1;i<1<<n;++i)
			for(int t=0;t<1<<m;++t)
			{
				cnt=0;
				rep(k,1,n)
					if(i&1<<k-1)
						flag[k]=true,++cnt;
					else
						flag[k]=false;
				rep(k,1,m)
					if(t&1<<k-1)
						pr[k]=true;
					else
						pr[k]=false;
					ans+=judge();
			}
		wr(ans);return;
	}
}
int quick(int x,int k)
	{
		int s=1;
		while(k)
		{
			if(k&1)
				s*=x,s%=P;
			x*=x,x%=P,k>>=1;
		}
		return s;
	}
namespace solve2
{
	void solve()
	{
		ans=n*(n-1)/2%P*quick(2,n-2)%P+n*quick(2,n-1)%P,wr(ans%P);return;
	}
}
signed main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	int x,y,z,T;n=read(),m=read();
	if(n<=8)
		solve1::solve();
	else
		solve2::solve();
	fclose(stdin),fclose(stdout);return 0;
}
