def remove_toffoli_from_line(local_qasm_line, qubit_1, qubit_2, target_qubit):
    """
    Remove a specific Toffoli gate from a line of qasm.

    Args:
        local_qasm_line: The line of qasm
        qubit_1: The first control qubit of the Toffoli gate
        qubit_2: The second control qubit
        target_qubit: The target qubit

    Returns: The same line of qasm without the Toffoli gate call

    """
    single_application = "Toffoli q[{}],q[{}],q[{}]".format(qubit_1, qubit_2, target_qubit)

    # if there is a parallel bar right
    local_qasm_line = local_qasm_line.replace(single_application + " | ", "")
    # else: if there is a parallel bar left
    local_qasm_line = local_qasm_line.replace(" | " + single_application, "")
    # else: if it is the only gate in parallelized brackets
    local_qasm_line = local_qasm_line.replace("{" + single_application + "}", "")
    # else: if it is not parellelized at all
    local_qasm_line = local_qasm_line.replace(single_application, "")
    return local_qasm_line