class_docstr: Coin Game environment.
code: def _to_RLlib_API(self, observations, rewards):
      state = {
          self.player_red_id: observations[0],
          self.player_blue_id: observations[1],
      }
      rewards = {
          self.player_red_id: rewards[0],
          self.player_blue_id: rewards[1],
      }
  
      epi_is_done = self.step_count_in_current_episode >= self.max_steps
      if self.step_count_in_current_episode > self.max_steps:
          logger.warning(
              "step_count_in_current_episode > self.max_steps: "
              f"{self.step_count_in_current_episode} > {self.max_steps}"
          )
  
      done = {
          self.player_red_id: epi_is_done,
          self.player_blue_id: epi_is_done,
          "__all__": epi_is_done,
      }
  
      if epi_is_done and self.output_additional_info:
          player_red_info, player_blue_info = self._get_episode_info()
          info = {
              self.player_red_id: player_red_info,
              self.player_blue_id: player_blue_info,
          }
      else:
          info = {}
  
      return state, rewards, done, done, info
  
imports: import copy
  import gymnasium
  import logging
  import numpy
  from gymnasium.spaces import Discrete
  from gymnasium.utils import seeding
  from ray.rllib.env.multi_agent_env import MultiAgentEnv
  from ray.rllib.utils import override
  from typing import Dict, Optional
  from ray.rllib.examples.env.utils.interfaces import InfoAccumulationInterface
label_desc: Use image node_id 17 for calling the CoinGame obj's underlying member method code with example usage: obj._to_RLlib_API(observations, rewards) and returns: state,  rewards,  done,  done,  info