class_docstr: Tracked state for each active episode.
class_docstr_tok: ["Tracked","state","for","each","active","episode","."]
code: def __init__(
      self,
      episode_id: str,
      results_avail_condition: threading.Condition,
      training_enabled: bool,
      multiagent: bool = False,
  ):
      self.episode_id = episode_id
      self.results_avail_condition = results_avail_condition
      self.training_enabled = training_enabled
      self.multiagent = multiagent
      self.data_queue = queue.Queue()
      self.action_queue = queue.Queue()
      if multiagent:
          self.new_observation_dict = None
          self.new_action_dict = None
          self.cur_reward_dict = {}
          self.cur_terminated_dict = {"__all__": False}
          self.cur_truncated_dict = {"__all__": False}
          self.cur_info_dict = {}
      else:
          self.new_observation = None
          self.new_action = None
          self.cur_reward = 0.0
          self.cur_terminated = False
          self.cur_truncated = False
          self.cur_info = {}
  
imports: import gymnasium
  import queue
  import threading
  import uuid
  from typing import Callable, Tuple, Optional, TYPE_CHECKING
  from ray.rllib.env.base_env import BaseEnv
  from ray.rllib.utils.annotations import override, PublicAPI
  from ray.rllib.utils.typing import EnvActionType, EnvInfoDict, EnvObsType, EnvType, MultiEnvDict
  from ray.rllib.utils.deprecation import deprecation_warning
label_desc: Use image node_id 1 to create a new _ExternalEnvEpisode object  with example: obj = _ExternalEnvEpisode(episode_id, results_avail_condition, training_enabled, multiagent)