#include <bits/stdc++.h>
#define int long long 
using namespace std;
const int N=100005;
const int MOD=1e9+7;
int n,m,cnt,ans,tot,mi2[N],head[N];
bool chosa[N],bak[N<<1],chosb[N<<1],vis[N];
struct qwq{int hext,to;}e[N<<1];
void add(int x,int y) {
	e[++tot].hext=head[x];
	e[tot].to=y;
	head[x]=tot;
}
void DFS(int x) {
	vis[x]=1;
	for (int i=head[x];i;i=e[i].hext) {
		if (bak[i]) continue;
		int v=e[i].to;
		if (!vis[v]) DFS(v);
	}
}
bool check() {
	int k=0;
	for (int i=1;i<=n;i++) {
		if (chosa[i]) {k=i;break;}
	}
	if (k==0) return 0;
	for (int i=1;i<=m*2-1;i+=2) {
		if (chosb[i]) continue;
		bak[i]=bak[i+1]=1;
		for (int j=1;j<=n;j++) vis[j]=0;
		DFS(k);
		for (int j=1;j<=n;j++) {
			if (chosa[j]&&(!vis[j])) return 0;
		}
		bak[i]=bak[i+1]=0;
	}
	return 1;
}
void dfsa(int x) {
	if (x==n) {
		if (check()) ans++;
		return ;
	}
	chosa[x+1]=1;
	dfsa(x+1);
	chosa[x+1]=0;
	dfsa(x+1);
}
void dfsb(int x) {
	if (x==2*m-1) {
		dfsa(0);
		return ;
	}
	chosb[x+2]=chosb[x+3]=1;
	dfsb(x+2);
	chosb[x+2]=chosb[x+3]=0;
	dfsb(x+2);
}
signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	cin>>n>>m;
	mi2[0]=1;
	for (int i=1;i<=n;i++) mi2[i]=mi2[i-1]*2%MOD;
	for (int i=1;i<=m;i++) {
		int x,y; cin>>x>>y;
		add(x,y);add(y,x);
	}
	dfsb(-1);
	ans%=MOD;
	cout<<ans;
	return 0;
}


/*
7 6
1 2
2 3
3 4
4 5
5 6
6 7
1120=5*2*2*56
=7*160
7*5*32



6 5
1 2
2 3
3 4
4 5
5 6

432=3*12*12
=6*72
6*4*18


5 4
1 2
2 3
3 4
4 5
160
=5*32



4 3
1 2 
2 3
3 4
56
=4*14


3 2
1 2 
2 3

18
=3*6


2 1
1 2

5



#include <bits/stdc++.h>
#define int long long 
using namespace std;
const int N=200005;
const int MOD=1e9+7;
int n,m,cnt,ans,tot,mi2[N],head[N];
bool chos[N<<1],vis[N];
struct qwq{int hext,to;}e[N<<1];
void add(int x,int y) {
	e[++tot].hext=head[x];
	e[tot].to=y;
	head[x]=tot;
}
void DFS(int x) {
	vis[x]=1;
	cnt++;
	for (int i=head[x];i;i=e[i].hext) {
		if (chos[i]) continue;
		int v=e[i].to;
		if (!vis[v]) DFS(v);
	}
}
int js(){
	int tmp=0;
	for (int i=1;i<=n;i++) vis[i]=0;
	for (int i=1;i<=n;i++)
		if (!vis[i]) {
			cnt=0;
			DFS(i);
			tmp=(tmp+mi2[cnt]-1+MOD)%MOD;
		}
	return tmp;
}
void dfs(int x) {
	if (x==2*m-1) {
		int tmp=js();
		ans=(ans+tmp)%MOD;
		return ;
	}
	chos[x+2]=chos[x+3]=1;
	dfs(x+2);
	chos[x+2]=chos[x+3]=0;
	dfs(x+2);
}
signed main(){
//	freopen("barrack.in","r",stdin);
//	freopen("barrack.out","w",stdout);
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	cin>>n>>m;
	mi2[0]=1;
	for (int i=1;i<=n;i++) mi2[i]=mi2[i-1]*2%MOD;
	for (int i=1;i<=m;i++) {
		int x,y; cin>>x>>y;
		add(x,y);add(y,x);
	}
	dfs(-1);
	cout<<ans;
	return 0;
}

*/
