#include<bits/stdc++.h>
#define fo(x,l,r) for (int x=(l); x<=(r); x++)
#define dw(x,r,l) for (int x=(r); x>=(l); x--)
#define int long long
using namespace std;
const int N=500006,M=2e6+6,mod=1e9+7;
int n,m,ans,cnt,h[N],t[M];
bool a[N],vis[N];
struct wc{
	int nx,to;
	bool b;
}e[M];
void adde(int u,int v){
	cnt++;
	e[cnt]={h[u],v,0};
	h[u]=cnt;
}
void dfs2(int x){
	vis[x]=1;
	for (int i=h[x]; i; i=e[i].nx){
		int y=e[i].to;
		if (e[i].b==1||vis[y]) continue;
		dfs2(y);
	}
}
void dfs(int k){
	if (k>n){
		int sum=0;
		fo(i,1,n) sum+=a[i];
		if (sum==0) return;
		int x=m;
		fo(i,1,m){
			e[i*2-1].b=1; e[i*2].b=1;
			bool ok=1;
			fo(j,1,n)
			if (a[j]){
				memset(vis,0,sizeof(vis));
				dfs2(j);
				fo(o,1,n) if (!vis[o]&&a[o]){
					ok=0;
					break;
				}
				if (!ok) break;
			}
			if (!ok) x--;
			e[i*2-1].b=0; e[i*2].b=0;
		}
		ans=(ans+t[x])%mod;
		return;
	}
	a[k]=1;
	dfs(k+1);
	a[k]=0;
	dfs(k+1);
}
signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	ios::sync_with_stdio(0),cin.tie(0);
	cin>>n>>m;
	t[0]=1;
	fo(i,1,m) t[i]=t[i-1]*2,t[i]%=mod;
	fo(i,1,m){
		int u,v; cin>>u>>v;
		adde(u,v); adde(v,u);
	}
	if (n>16){
		ans=n*(n-1)/2%mod*t[m-1]%mod;
		ans=(ans+n*t[m]%mod)%mod;
		cout<<ans;
		return 0;
	}
	dfs(1);
	cout<<ans;
	return 0;
}