def get_bb_insn(f, va):
    """fetch the BasicBlock and Instruction instances for the given VA in the given function."""
    for bb in f.basic_blocks:
        for insn in bb.instructions:
            if insn.va == va:
                return (bb, insn)
    raise KeyError(va)