class_docstr: REST client to interact with an RLlib policy server.
docstr: Record an observation and get the on-policy action.
  
  Args:
      episode_id: Episode id returned from start_episode().
      observation: Current environment observation.
  
  Returns:
      action: Action from the env action space.
docstr_tok: ["Record","an","observation","and","get","the","on-policy","action",".","Args",":","episode_id",":","Episode","id","returned","from","start_episode","(",")",".","observation",":","Current","environment","observation",".","Returns",":","action",":","Action","from","the","env","action","space","."]
code: def get_action(
      self,
      episode_id: str,
      observation: Union[EnvObsType, MultiAgentDict],
  ) -> Union[EnvActionType, MultiAgentDict]:
      """Record an observation and get the on-policy action.
  
      Args:
          episode_id: Episode id returned from start_episode().
          observation: Current environment observation.
  
      Returns:
          action: Action from the env action space.
      """
  
      if self.local:
          self._update_local_policy()
          if isinstance(episode_id, (list, tuple)):
              actions = {
                  eid: self.env.get_action(eid, observation[eid])
                  for eid in episode_id
              }
              return actions
          else:
              return self.env.get_action(episode_id, observation)
      else:
          return self._send(
              {
                  "command": Commands.GET_ACTION,
                  "observation": observation,
                  "episode_id": episode_id,
              }
          )["action"]
  
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 3 for calling the PolicyClient obj's underlying member method code with example usage: obj.get_action(episode_id, observation) and returns: self, actions, self