def get_topo(idx, conn):
    """
    Get the topology for an id.

    Args:
        idx: Protein id.
        conn: Sqlite3 connection object.

    Returns:
        Tuple of (num_tms, num_reentrant).
    """
    return conn.cursor().execute('SELECT num_tms, num_res FROM proteins WHERE id=?', (idx, )).fetchone()