def add_jump_instruction(jump_arg, code_to_insert):
    """
    Add additional instruction POP_JUMP_IF_TRUE to implement a proper jump for "set next statement" action
    Jump should be done to the beginning of the inserted fragment
    :param jump_arg: argument for jump instruction
    :param code_to_insert: code to insert
    :return: a code to insert with properly added jump instruction
    """
    extended_arg_list = []
    if jump_arg > MAX_BYTE:
        extended_arg_list += [EXTENDED_ARG, jump_arg >> 8]
        jump_arg = jump_arg & MAX_BYTE

    # remove 'RETURN_VALUE' instruction and add 'POP_JUMP_IF_TRUE' with (if needed) 'EXTENDED_ARG'
    return list(code_to_insert.co_code[:-RETURN_VALUE_SIZE]) + extended_arg_list + [opmap['POP_JUMP_IF_TRUE'], jump_arg]

    Add additional instruction POP_JUMP_IF_TRUE to implement a proper jump for "set next statement" action
    Jump should be done to the beginning of the inserted fragment
    :param jump_arg: argument for jump instruction
    :param code_to_insert: code to insert
    :return: a code to insert with properly added jump instruction
    
debugger/src/_pydevd_frame_eval/pydevd_modify_bytecode.py