#include <bits/stdc++.h>
using namespace std;
#define pb push_back
const int N = 20, M = 1e6 + 5, mod = 1e9 + 7;
int n, m, f[N], pa[N][N], ans;
struct edge {
	int x, y;
} e[M];
int getf(int x) {return f[x] == x ? x : f[x] = getf(f[x]);}
int fpow(int x, int y) {
	if (y < 0) return 1;
	int res = 1;
	while (y) {
		if (y & 1) res = 1ll * res * x % mod;
		x = 1ll * x * x % mod, y >>= 1;
	}
	return res;
}

int main() {
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
	scanf("%d%d", &n, &m);
	for (int i = 1; i <= m; i++)
		scanf("%d%d", &e[i].x, &e[i].y), e[i].x--, e[i].y--;
	if (n <= 16 && m <= 25) {
		for (int i = 1; i <= m; i++) {
			iota(f, f + n, 0);
			for (int j = 1; j <= m; j++) if (i != j) {
				f[getf(e[j].x)] = getf(e[j].y);
			}
			for (int j = 0; j < n; j++) pa[i][j] = getf(j);
		}
		for (int i = 1; i < (1 << n); i++) {
			int cnt = 0;
			for (int j = 1; j <= m; j++) {
				int now = -1; bool ok = 0;
				for (int k = 0; k < n; k++)
					if (i >> k & 1) {
						if (now == -1) now = pa[j][k];
						else if (pa[j][k] != now) ok = 1;
					}
				cnt += ok;
			}
			ans = (ans + fpow(2, m - cnt)) % mod;
		}
		printf("%d\n", ans);
	} else {
		for (int k = 0; k < n; k++) {
			ans = (ans + 1ll * (n - k) * fpow(2, k - 1) % mod
				* fpow(2, n - k - 1)) % mod;
		}
		printf("%d\n", ans);
	}
	return 0;
}