<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_call_parameters( global_state: GlobalState, dynamic_loader: DynLoader, with_value=False ):
 """Gets call parameters from global state Pops the values from the stack and determines output parameters. :param global_state: state to look in :param dynamic_loader: dynamic loader to use :param with_value: whether to pop the value argument from the stack :return: callee_account, call_data, value, call_data_type, gas """

    gas, to = global_state.mstate.pop(2)
    value = global_state.mstate.pop() if with_value else 0
    memory_input_offset, memory_input_size, memory_out_offset, memory_out_size = global_state.mstate.pop(
        4
    )

    callee_address = get_callee_address(global_state, dynamic_loader, to)

    callee_account = None
    call_data = get_call_data(global_state, memory_input_offset, memory_input_size)
    if int(callee_address, 16) >= 5 or int(callee_address, 16) == 0:
        callee_account = get_callee_account(
            global_state, callee_address, dynamic_loader
        )

    return (
        callee_address,
        callee_account,
        call_data,
        value,
        gas,
        memory_out_offset,
        memory_out_size,
    )