/*---------------------
  auther: nomonick
  contest: NOIP
  task name: barrack
  code time: 2022/11/26 11:13
  E(T3): 45
  rp++
---------------------*/
#include <bits/stdc++.h>
using namespace std;

#define int long long
const int SIZE = (int)1e6 + 50;
const int NUM = 51;
const int mod = (int)1e9 + 7;

inline int read()
{
	int x = 0,f = 1;
	char ch = getchar();
	while (ch < '0' or ch > '9')
	{
		if (ch == '-') f = -1;
		ch = getchar();
	}
	while ('0' <= ch and ch <= '9')
	{
		x = (x << 1) + (x << 3) + (ch ^ 48);
		ch = getchar();
	}
	return f * x;
}

inline void write(int x)
{
	if (x < 0) putchar('-'), x *= -1;
	if (x > 9) write(x / 10), putchar((x % 10) + '0');
	else putchar(x % 10 + '0');
}

int n,m,ans;
int power_2[SIZE],res[SIZE],tmp[SIZE],siz[SIZE];
int line[NUM][NUM];
bool flag;
bool vis[SIZE];
queue<int> que;
std::vector<int> edge[SIZE / 2];
std::map<pair<int,int> , int> id;

inline int qsm(int a,int base)
{
	int res = 1;
	while (base)
	{
		if (base & 1) res = res * a % mod;
		a = a * a % mod;
		base >>= 1;
	}
	return res;
}

inline void sub1()
{
	int ans = 2 * n % mod;
	for (int i = 2; i <= n; ++i) ans = (ans + power_2[n-2] * (i - 1) % mod) % mod;
	write(ans); puts("");
	exit(0);
}

inline void dfs(int u,int fa)
{
	res[u] = 2; 
	int tot = edge[u].size() - 1; siz[u] = 1;
	for (auto v : edge[u])
	{
		if (v == fa) continue;
		dfs(v,u); 
		res[u] = (res[u] + res[v] - 1 + res[v]) % mod;
		tmp[tot] = tmp[tot] * (res[u]);
	}
}

inline void sub2()
{
	dfs(1,-1);
	write(res[1]); puts("");
	exit(0);
}

inline void bfs(int s)
{
	que.push(s); line[s][s] = 0;
	while (!que.empty())
	{
		int u = que.front(); que.pop();
		// cout << s << " " << u << " " << line[s][u] << endl;
		for (auto v : edge[u])
		{
			int i = id[make_pair(u,v)];
			int k = line[s][v],p = line[s][u];
			p = p | power_2[i];
			if ((p & k) != k) que.push(v),line[s][v] = p;
		}
	}
}

inline void clac(int i,bool flag)
{
	if (i > n)
	{
		int x = 0, t = power_2[m]; if (!flag) return;
		for (int i = 1; i <= n; ++i)
			for (int j = i; j <= n; ++j)
				if (tmp[i] and tmp[j])
					x |= line[i][j];
		while (x)
		{
			if (x & 1) t = t * qsm(2,mod-2) % mod;
			x >>= 1;
		}
		ans = (ans + t) % mod;
	}
	else
	{
		tmp[i] = 0; clac(i+1,flag);
		tmp[i] = 1; clac(i+1,true);
	}
}

inline void plain()
{
	int cnt = 0;
	for (int i = 1; i <= n; ++i) for (auto v : edge[i]) if (!id[make_pair(i,v)]) id[make_pair(i,v)] = id[make_pair(v,i)] = ++cnt;
	for (int i = 1; i <= n; ++i) for (int j = 1; j <= n; ++j) line[i][j] = power_2[m+1]-2;
	for (int i = 1; i <= n; ++i) bfs(i);
	clac(1,false); write(ans); puts("");
	exit(0);
}

signed main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	n = read(); m = read(); power_2[0] = 1; flag = (n == m + 1);
	for (int i = 1; i <= m; ++i) {int u = read(),v = read(); edge[u].push_back(v); edge[v].push_back(u);}
	for (int i = 1; i <= m; ++i) power_2[i] = power_2[i-1] * 2 % mod;
	for (int i = 1; i <= n and flag; ++i) for (auto v : edge[i]) if (v != i - 1 and v != i + 1) flag = false;
	if (n <= 30 and m <= 50) plain();
	if (flag) sub1();
	if (n == m + 1) sub2();
	return 0;
}
