def append_instr(qobj, exp_index, instruction):
    """Append a QasmQobjInstruction to a QobjExperiment.

    Args:
        qobj (Qobj): a Qobj object.
        exp_index (int): The index of the experiment in the qobj.
        instruction (QasmQobjInstruction): instruction to insert.
    """
    qobj.experiments[exp_index].instructions.append(instruction)
    return qobj