#include <bits/stdc++.h>

constexpr int p = 1e9 + 7;

int n, m;

namespace sub1 {
	int i, j, sum = 0, u[55], v[55];
	int f[55][55], vis[55], flg;
	std::vector <int> g[55];
	void dfs (int x, int cnt) {
		int ncnt = cnt;
		vis[x] = 1;
		if (i & (1<<x-1)) ncnt ++;
		if (ncnt == sum) flg = 1; 
		for (auto y : g[x])
			if (!vis[y]) dfs (y, ncnt);
	}
	void qwq () {
		for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) f[i][j] = f[j][i] = 0;
		for (i = 1; i <= m; i++)
		 	std::cin >> u[i] >> v[i], f[u[i]][v[i]] = f[v[i]][u[i]] = 1;
		int ans = 0;
		for (i = 1; i < (1<<n); i++) {
			for (j = 0; j < (1<<m); j++) {
				sum = 0;
				int s = -1;
				for (int x = 1; x <= n; x++) {
					g[x].clear (); vis[x] = 0;
					if (i & (1<<x-1)) sum ++, s = x;
				}
				for (int x = 1; x <= m; x++) 
					if (j & (1<<x-1)) g[u[x]].push_back (v[x]), g[v[x]].push_back (u[x]);
				flg = 0;
				dfs (s, 0);
				ans += flg;
//				if (flg) std::cout << i << ' ' << j << ' ' << ans << '\n';
			}
		}
		std::cout << ans << '\n';
	}
}

constexpr int N = 5e5 + 5;

namespace sub3 {
	int f[N], sz[N];
	std::vector <int> g[N];
	int qpow (int x, int y) {
		int ret = 1;
		for (; y; y >>= 1, x = 1ll*x*x%p)
			if (y & 1) ret = 1ll*ret*x%p;
		return ret;
	}
	void dfs (int u, int pre) {
		sz[u] = 1, f[u] = 1;
		int s = 1;
		for (auto v : g[u]) {
			if (pre == v) continue;
			dfs (v, u);
			f[u] = 1ll * f[u] * (f[v] + qpow (2, sz[v])) % p;
			s = 1ll * s * (qpow (2, sz[v]+sz[v]) - f[v] + p) % p;
			sz[u] += sz[v];
		}
//		std::cout << res << ' ' << s << '\n';
		f[u] = (f[u] * 2 % p - s + p) % p;
		if (sz[u] == 1) f[u] = 1;
	}
	void qwq () {
		for (int i = 1; i <= m; i++) {
			int u, v;
			std::cin >> u >> v;
			g[u].push_back (v), g[v].push_back (u);
		}
		dfs (1, -1);
		long long ans = 0;
		for (int i = 1; i <= n; i++) ans = (ans + f[i]) % p;
		std::cout << ans << '\n';
	}
}

int main () {
	std::ios::sync_with_stdio (false);
	std::cin.tie (nullptr), std::cout.tie (nullptr);
	freopen ("barrack.in", "r", stdin);
	freopen ("barrack.out", "w", stdout);
	std::cin >> n >> m;
	if (n <= 50) {
		sub1::qwq ();
		return 0;
	}
	if (m == n-1) {
		sub3::qwq ();
		return 0;
	}
	return 0;
}