class_docstr: This class keeps track of services that can be employed by all objects of the agent-environment loop.
  
  Currently the context is populated by
  
  - Event service: Acts as backend of the PubSub service, collects all events from the env.
    The event service can also be directly facilitated by components outside the environment (e.g. agent, heuristics,
    state/observation mapping)
  - Episode ID: Generates and keeps track of the current episode ID
    Episode IDs are used for connecting logged statistics, events and recorded trajectory data together, making
    analysis and drill-down across these different levels possible.
  - Step ID: Tracks ID of the core env step we are currently in. Helps wrappers recognize core env steps in multi-step
    scenarios.
  - Post-step callbacks: Handles registration of post-step callbacks and provides a utility to run them (usually
                         triggered from the outer-most wrapper)
  - Step lifecycle flags: Flags partially managed from the wrapper stack, helping the wrappers to determine
                          where we are in the step lifecycle and which one is the outer-most one
docstr: Clone environment by resetting to the provided context.
  
  :param context: The environment context to clone.
docstr_tok: ["Clone","environment","by","resetting","to","the","provided","context",".",":","param","context",":","The","environment","context","to","clone","."]
code: def clone_from(self, context: "EnvironmentContext") -> None:
      """Clone environment by resetting to the provided context.
  
      :param context: The environment context to clone.
      """
      # cloning context.event_service is not required as this gets cleared prior to each step in
      # maze.core.env.environment_context.EnvironmentContext.pre_step
      # (as Python's GC cant resolve circular dependencies this would anyways cause severe problems)
      # self.event_service = copy.deepcopy(context.event_service)
  
      self.step_id = context.step_id
      self._episode_id = context._episode_id
  
file_path: maze/maze/core/env/environment_context.py
imports: import uuid
  from typing import Callable
label_desc: Use image node_id 7 for calling the EnvironmentContext obj's underlying member method code with example usage: obj.clone_from(context) without return types