#include <bits/stdc++.h>
using namespace std;
const int N = 500005,P = 1000000007,I2 = (P + 1) / 2;
using ll = long long;
ll qpow(ll a,ll b)
{
    ll ret = 1;
    while (b)
    {
        if (b & 1) ret = ret * a % P;
        a = a * a % P;b >>= 1;
    }
    return ret;
}
namespace FIO
{
    const int S = 1 << 22;char buf[S];int ptr,len;
    inline int getch()
    {
        if (ptr == len) ptr = 0,len = fread(buf,1,S,stdin);
        if (ptr == len) return EOF;
        return buf[ptr++];
    }
}
template <typename T>
void read(T &num)
{
    num = 0;
    int ch = FIO::getch();while (!isdigit(ch) && ch != '-') ch = FIO::getch();
    int fl = 1;if (ch == '-') fl = -1,ch = FIO::getch();
    while (isdigit(ch)) num = num * 10 + (ch - 48),ch = FIO::getch();
    num *= fl;
}
template <typename T>
void write(T num)
{
    if (num < 0) putchar('-'),num = -num;
    if (!num) {putchar('0');return;}
    static char buf[1024];int ptr = 0;
    while (num) buf[ptr++] = num % 10,num /= 10;
    while (ptr--) putchar(buf[ptr] + '0');
}
int n,m,dfn[N],low[N],idx,stk[N],top,bel[N],bidx,a[N];bool instk[N];
vector<int> v[N],e[N];
void tarjan(int pos,int fa)
{
    dfn[pos] = low[pos] = ++idx;stk[++top] = pos;instk[pos] = 1;
    for (auto &i : v[pos])
    {
        if (i == fa) continue;
        if (!dfn[i]) tarjan(i,pos),low[pos] = min(low[pos],low[i]);
        else if (instk[i]) low[pos] = min(low[pos],dfn[i]);
    }
    if (dfn[pos] == low[pos])
    {
        ++bidx;
        while (stk[top] != pos) { ++a[bidx];bel[stk[top]] = bidx;instk[stk[top]] = 0;--top; }
        ++a[bidx];bel[stk[top]] = bidx;instk[stk[top]] = 0;--top;
    };
}
ll f[N],g[N];
inline void add(ll &a,ll b) {a = (a + b) % P;}
inline void sub(ll &a,ll b) {a = (a - b + P) % P;}
void dfs(int pos,int fa)
{
    ll prod = 1,sum = 0;
    for (auto &i : e[pos])
    {
        if (i == fa) continue;
        dfs(i,pos);add(g[pos],g[i] * I2);
        prod = prod * (g[i] * I2 % P + 1) % P;add(sum,g[i] * I2);
    }
    add(f[pos],prod);sub(f[pos],sum);sub(f[pos],1);
    add(f[pos],(qpow(2,a[pos]) - 1) * prod);add(g[pos],f[pos]);
    // cerr << f[pos] << ' ' << g[pos] << ' ' << a[pos] << ' ' << prod << endl;
}

int main ()
{
    freopen("barrack.in","r",stdin);
    freopen("barrack.out","w",stdout);
    ios::sync_with_stdio(false);
    read(n);read(m);int t1,t2;
    // cerr << "XX" << ' ' << n << ' ' << m << endl;
    for (int i = 1;i <= m;i++) { read(t1);read(t2);v[t1].push_back(t2);v[t2].push_back(t1); }
    tarjan(1,0);
    int EC = 0;
    for (int i = 1;i <= n;i++)
        for (auto &j : v[i]) if (bel[i] != bel[j]) e[bel[i]].push_back(bel[j]),++EC;
    assert(EC / 2 == bidx - 1);dfs(1,0);
    ll ans = 0;for (int i = 1;i <= bidx;i++) ans += f[i];
    cout << ans % P * qpow(2,m) % P << endl;
    return 0;
}