#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;

//bool _u;

namespace AK {

typedef long long ll;
typedef double db;


#define rep(i, l, r) for(int i = l, i##end = r; i <= i##end; ++ i)
#define per(i, l, r) for(int i = l, i##end = r; i >= i##end; -- i)
#define pb push_back
#define pc putchar

template <class T>
inline void chmax(T &x,const T &y) {
	if(x < y) x = y;
}

template <class T>
inline void chmin(T &x, const T &y) {
	if(y < x) x = y;
}

inline int read() {
	int res = 0; char ch = getchar(); bool f = 1;
	for(; ch < '0' || ch > '9'; ch = getchar())
		if(ch == '-') f = 0;
	for(; ch >= '0' && ch <= '9'; ch = getchar())
		res = res * 10 + ch - '0';
	return f ? res : -res;
}

const int N = 2e6 + 15, P = 1e9 + 7;
const ll inv2 = (P + 1) / 2;
int to[N * 2], nxt[N * 2], head[N], ecnt;
int dfn[N], low[N], cnt;
int siz[N];
int n, m;
bool vis[N];
int fa[N];
unordered_map <ll, int> S;

vector <int> G[N];

ll pw[N], f[N], g[N], ans;

inline int find(int x) {
	return fa[x] == x ? x : (fa[x] = find(fa[x]));
}

void merge(int x, int y) {
	x = find(x); y = find(y);
	if(x != y) fa[x] = y;
}

inline void madd(ll &x, ll y) {
	x += y;
	if(x >= P) x -= P;
}

inline ll mod(ll x) {
	return x >= P ? x - P : x;
}

inline void add(int x, int y) {
	to[++ ecnt] = y;
	nxt[ecnt] = head[x];
	head[x] = ecnt;
}

inline void vadd(int x, int y) {
	if(x == y) return ;
	if(x > y) swap(x, y);
	ll h = 1ll * x * (n + 1) * y;
	if(S[h]) return ;
	S[h] = 1;
	G[x].pb(y);
	G[y].pb(x);
}

void tarjan(int u, int fa) {
	dfn[u] = low[u] = ++ cnt;
	for(int i = head[u], v; i; i = nxt[i]) {
		v = to[i];
		if(v == fa) continue;
		if(!dfn[v]) {
			tarjan(v, u);
			chmin(low[u], low[v]);
			if(low[v] <= dfn[u]) merge(u, v);
		} else chmin(low[u], dfn[v]);
	}
}

void dfs(int u, int fa) {
	if(vis[u]) return ;
	vis[u] = 1;
	ll mg = 1, sg = 0, tmp;
	for(int v : G[u]) {
		if(v == fa || vis[v]) continue;
		dfs(v, u);
		tmp = (g[v] * inv2) % P;
		mg = (tmp + 1) * mg % P;
		madd(sg, tmp);
	}
	f[u] = (pw[siz[u]] * mg % P - sg - 1 + P) % P;
	g[u] = (f[u] + sg) % P;
}

void Main() {
	int x, y;
	n = read(); m = read();
	rep(i, 1, m) {
		x = read(); y = read();
		add(x, y); add(y, x);
	}
	// connected
	rep(i, 1, n) fa[i] = i;
	tarjan(1, 0);
	rep(i, 1, n) siz[find(i)] ++ ;
	for(int i = 1; i <= ecnt; i += 2)
		vadd(find(to[i]), find(to[i + 1]));
	pw[0] = 1;
	rep(i, 1, max(n, m)) pw[i] = pw[i - 1] * 2 % P;
	cerr << "======" << endl;
	dfs(find(1), 0);
	rep(i, 1, n) madd(ans, f[i]);
	printf("%lld\n", ans * pw[m] % P);
}

}

//bool _v;

signed main() {
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
	//clock_t st = clock();
	AK :: Main();
	//cerr << "time = " << (clock() - st) * 1.0 / CLOCKS_PER_SEC << endl;
	//cerr << "space = " << (&_u - &_v) / 1048576.0 << endl;
	return 0;
}
