class_docstr: REST client to interact with an RLlib policy server.
docstr: Record returns from the environment.
  
  The reward will be attributed to the previous action taken by the
  episode. Rewards accumulate until the next action. If no reward is
  logged before the next action, a reward of 0.0 is assumed.
  
  Args:
      episode_id: Episode id returned from start_episode().
      reward: Reward from the environment.
      info: Extra info dict.
      multiagent_done_dict: Multi-agent done information.
docstr_tok: ["Record","returns","from","the","environment",".","The","reward","will","be","attributed","to","the","previous","action","taken","by","the","episode",".","Rewards","accumulate","until","the","next","action",".","If","no","reward","is","logged","before","the","next","action",",","a","reward","of","0.0","is","assumed",".","Args",":","episode_id",":","Episode","id","returned","from","start_episode","(",")",".","reward",":","Reward","from","the","environment",".","info",":","Extra","info","dict",".","multiagent_done_dict",":","Multi-agent","done","information","."]
code: def log_returns(
      self,
      episode_id: str,
      reward: float,
      info: Union[EnvInfoDict, MultiAgentDict] = None,
      multiagent_done_dict: Optional[MultiAgentDict] = None,
  ) -> None:
      """Record returns from the environment.
  
      The reward will be attributed to the previous action taken by the
      episode. Rewards accumulate until the next action. If no reward is
      logged before the next action, a reward of 0.0 is assumed.
  
      Args:
          episode_id: Episode id returned from start_episode().
          reward: Reward from the environment.
          info: Extra info dict.
          multiagent_done_dict: Multi-agent done information.
      """
  
      if self.local:
          self._update_local_policy()
          if multiagent_done_dict is not None:
              assert isinstance(reward, dict)
              return self.env.log_returns(
                  episode_id, reward, info, multiagent_done_dict
              )
          return self.env.log_returns(episode_id, reward, info)
  
      self._send(
          {
              "command": Commands.LOG_RETURNS,
              "reward": reward,
              "info": info,
              "episode_id": episode_id,
              "done": multiagent_done_dict,
          }
      )
  
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 5 for calling the PolicyClient obj's underlying member method code with example usage: obj.log_returns(episode_id, reward, info, multiagent_done_dict) and returns: self, self