from typing import Tuple
from typing import Sequence


def get_involved_bits(instruction) -> Tuple[Sequence[int], Sequence[int]]:
    """Returns the bits involved in the instruction.

    :param instruction: The instruction of interest.
    :return: The quantum and classical bits used by the considered instruction.
    """
    qubits = instruction.get('qubits', [])
    clbits = instruction.get('clbits', [])
    if 'conditional' in instruction:
        mask = int(instruction['conditional']['mask'], 0)
        number_of_clbits = len(bin(mask)[2:])
        clbits += list(range(number_of_clbits))

    return qubits, clbits