class_docstr: REST client to interact with an RLlib policy server.
docstr: Record an observation and (off-policy) action taken.
  
  Args:
      episode_id: Episode id returned from start_episode().
      observation: Current environment observation.
      action: Action for the observation.
docstr_tok: ["Record","an","observation","and","(","off-policy",")","action","taken",".","Args",":","episode_id",":","Episode","id","returned","from","start_episode","(",")",".","observation",":","Current","environment","observation",".","action",":","Action","for","the","observation","."]
code: def log_action(
      self,
      episode_id: str,
      observation: Union[EnvObsType, MultiAgentDict],
      action: Union[EnvActionType, MultiAgentDict],
  ) -> None:
      """Record an observation and (off-policy) action taken.
  
      Args:
          episode_id: Episode id returned from start_episode().
          observation: Current environment observation.
          action: Action for the observation.
      """
  
      if self.local:
          self._update_local_policy()
          return self.env.log_action(episode_id, observation, action)
  
      self._send(
          {
              "command": Commands.LOG_ACTION,
              "observation": observation,
              "action": action,
              "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 4 for calling the PolicyClient obj's underlying member method code with example usage: obj.log_action(episode_id, observation, action) and returns: self