//Ten-year OI turning into air,
//Without long long dying with tear!
#include<bits/stdc++.h>
#define int long long
const int MOD = 1e9+7;
const int N = 5e5+7;
int n, m;
namespace slv0{
    const int N = 20;
    int u[N], v[N];
    int fa[N];
    int ans;
    void init(){
        for(int i=1; i<=n; i++)
            fa[i] = i;
    }
    int fd(int x){
        return fa[x]==x? x:fa[x]=fd(fa[x]);
    }
    void un(int x, int y){
        fa[fd(x)] = fd(y);
    }
    void main(){
        for(int i=1; i<=m; i++)
            scanf("%lld%lld", u+i, v+i);
        for(int I=1; I<(1<<n); I++)
            for(int J=0; J<(1<<m); J++){
                init(); int flg = true;
                for(int j=1; j<=n; j++)
                    if((J>>j-1)&1)
                        un(u[j], v[j]);
                int f = -1;
                for(int i=1; i<=n; i++)
                    if((I>>i-1)&1)
                        if(f == -1) f = fa[i];
                        else if(f != fa[i]) flg = false;
                ans += flg, ans %= MOD;
            }
        printf("%lld\n", ans);
    }
}
namespace slv1{
    std::vector<int> e[N];
    int sz[N], f[N][2];
    int fpow(int a, int b){
        if(b == 0) return 1;
        int res = fpow(a, b>>1);
        return res * res % MOD * (b&1? a:1) % MOD;
    }
    void dfs(int cur, int fa){
        sz[cur] = 1;
        for(int i: e[cur]) if(i != fa){
            dfs(i, cur); sz[cur] += sz[i];
        }
        f[cur][1] = 1;
        for(int i: e[cur]) if(i != fa){
            f[cur][1] *= (fpow(2, sz[i]-1) + f[i][1]) % MOD;
            f[cur][0] += (2 * f[i][0] + f[i][1] - fpow(2, sz[i]-1)) % MOD
                * fpow(2, sz[cur]-sz[i]-1) % MOD;
            f[cur][1] %= MOD, f[cur][0] %= MOD;
        }
        f[cur][1] = 2 * f[cur][1] % MOD;
    }
    void main(){
        for(int i=1; i<=m; i++){
            int u, v; scanf("%lld%lld", &u, &v);
            e[u].push_back(v); e[v].push_back(u);
        }
        dfs(1, 0);
        printf("%lld\n", (f[1][1]+f[1][0]-fpow(2, m) + MOD) % MOD);
    }
}
signed main(){
    freopen("barrack.in", "r", stdin);
    freopen("barrack.out", "w", stdout);
    scanf("%lld%lld", &n, &m);
    if(m == n-1) slv1::main();
    else if(n <= 16) slv0::main();
    return 0;
}