def METHOD_NAME(cls, env: Environment):
    context_object_init = ContextObjectInitData(
        Execution=env.context_object_manager.context_object["Execution"],
        StateMachine=env.context_object_manager.context_object["StateMachine"],
    )
    frame = cls(context_object_init=context_object_init)
    frame._is_frame = True
    frame.event_history = env.event_history
    frame.callback_pool_manager = env.callback_pool_manager
    frame.heap = env.heap
    frame._program_state = copy.deepcopy(env._program_state)
    return frame