class_docstr: REST client to interact with an RLlib policy server.
docstr: Record the end of an episode.
  
  Args:
      episode_id: Episode id returned from start_episode().
      observation: Current environment observation.
docstr_tok: ["Record","the","end","of","an","episode",".","Args",":","episode_id",":","Episode","id","returned","from","start_episode","(",")",".","observation",":","Current","environment","observation","."]
code: def end_episode(
      self,
      episode_id: str,
      observation: Union[EnvObsType, MultiAgentDict],
  ) -> None:
      """Record the end of an episode.
  
      Args:
          episode_id: Episode id returned from start_episode().
          observation: Current environment observation.
      """
  
      if self.local:
          self._update_local_policy()
          return self.env.end_episode(episode_id, observation)
  
      self._send(
          {
              "command": Commands.END_EPISODE,
              "observation": observation,
              "episode_id": episode_id,
          }
      )
  
imports: import logging
  import threading
  import time
  from typing import Union, Optional
  from enum import Enum
  import ray.cloudpickle
  from ray.rllib.env.external_env import ExternalEnv
  from ray.rllib.env.external_multi_agent_env import ExternalMultiAgentEnv
  from ray.rllib.env.multi_agent_env import MultiAgentEnv
  from ray.rllib.policy.sample_batch import MultiAgentBatch
  from ray.rllib.utils.annotations import PublicAPI
  from ray.rllib.utils.typing import MultiAgentDict, EnvInfoDict, EnvObsType, EnvActionType
label_desc: Use image node_id 6 for calling the PolicyClient obj's underlying member method code with example usage: obj.end_episode(episode_id, observation) and returns: self