#include <bits/stdc++.h>
using namespace std;

template <typename T>
inline void read(T &f) {
	f = 0; int fu = 0; char c = getchar();
	while (c < '0' || c > '9') {
		if (c == '-') fu = 1;
		c = getchar();
	}
	while (c >= '0' && c <= '9') {
		f = f * 10 + c - '0';
		c = getchar();
	}
	if (fu) f = -f;
}

const int md = 1e9 + 7, inv2 = (md + 1) / 2;

inline int add(int x, int y) {
	if (x + y >= md) return x + y - md;
	return x + y;
}

inline int sub(int x, int y) {
	if (x < y) return x - y + md;
	return x - y;
}

inline int mul(int x, int y) { return 1ull * x * y % md; }

inline int fpow(int x, int y) {
	int ans = 1;
	while (y) {
		if (y & 1) ans = mul(ans, x);
		y >>= 1; x = mul(x, x);
	}
	return ans;
}

inline void upd(int &x, int y) { x = add(x, y); }

const int N = 5e5 + 5;

vector <int> adj[N], edg[N];
int low[N], dfn[N], st[N], col[N], cnt[N];
int n, m, top, dfnt, tot;

void tarjan(int u, int fa) {
	low[u] = dfn[u] = ++dfnt; st[++top] = u;
	for (auto v : adj[u]) {
		if (v == fa) continue;
		if (!dfn[v]) {
			tarjan(v, u);
			low[u] = min(low[u], low[v]);
		} else low[u] = min(low[u], dfn[v]);
	}
	if (low[u] == dfn[u]) {
		++tot;
		int tmp = 0;
		while (tmp != u) {
			tmp = st[top--];
			col[tmp] = tot;
			++cnt[tot];
		}
	}
}

int dp[N], f[3], ans;
void dfs1(int u, int fa) {
	for (auto v : edg[u]) {
		if (v == fa) continue;
		dfs1(v, u);
	}
	memset(f, 0, sizeof(f));
	f[0] = 1;
	for (auto v : edg[u]) {
		if (v == fa) continue;
		for (int i = 2; i >= 0; i--) {
			upd(f[min(i + 1, 2)], mul(f[i], mul(dp[v], inv2)));
		}
	}
	int pw = fpow(2, cnt[u]);
	upd(ans, mul(f[0], pw - 1));
	upd(ans, mul(f[1], pw - 1));
	upd(ans, mul(f[2], pw));
	upd(dp[u], mul(f[0], pw - 1));
	upd(dp[u], mul(f[1], pw));
	upd(dp[u], mul(f[2], pw));
}

int main() {
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
	read(n); read(m);
	for (int i = 1; i <= m; i++) {
		int u, v;
		read(u); read(v);
		adj[u].push_back(v);
		adj[v].push_back(u);
	}
	tarjan(1, 0);
	for (int u = 1; u <= n; u++) {
		for (auto v : adj[u]) {
			if (col[u] != col[v]) {
				edg[col[u]].push_back(col[v]);
			}
		}
	}
	dfs1(1, 0);
	ans = mul(ans, fpow(2, m));
	printf("%d\n", ans);
	return 0;
}