class_docstr: The lowest-level env interface used by RLlib for sampling.
  
  BaseEnv models multiple agents executing asynchronously in multiple
  vectorized sub-environments. A call to `poll()` returns observations from
  ready agents keyed by their sub-environment ID and agent IDs, and
  actions for those agents can be sent back via `send_actions()`.
  
  All other RLlib supported env types can be converted to BaseEnv.
  RLlib handles these conversions internally in RolloutWorker, for example:
  
  gym.Env => rllib.VectorEnv => rllib.BaseEnv
  rllib.MultiAgentEnv (is-a gym.Env) => rllib.VectorEnv => rllib.BaseEnv
  rllib.ExternalEnv => rllib.BaseEnv
  
  .. testcode::
      :skipif: True
  
      MyBaseEnv = ...
      env = MyBaseEnv()
      obs, rewards, terminateds, truncateds, infos, off_policy_actions = (
          env.poll()
      )
      print(obs)
  
      env.send_actions({
        "env_0": {
          "car_0": 0,
          "car_1": 1,
        }, ...
      })
      obs, rewards, terminateds, truncateds, infos, off_policy_actions = (
          env.poll()
      )
      print(obs)
  
      print(terminateds)
  
  .. testoutput::
  
      {
          "env_0": {
              "car_0": [2.4, 1.6],
              "car_1": [3.4, -3.2],
          },
          "env_1": {
              "car_0": [8.0, 4.1],
          },
          "env_2": {
              "car_0": [2.3, 3.3],
              "car_1": [1.4, -0.2],
              "car_3": [1.2, 0.1],
          },
      }
      {
          "env_0": {
              "car_0": [4.1, 1.7],
              "car_1": [3.2, -4.2],
          }, ...
      }
      {
          "env_0": {
              "__all__": False,
              "car_0": False,
              "car_1": True,
          }, ...
      }
class_docstr_tok: ["The","lowest-level","env","interface","used","by","RLlib","for","sampling",".","BaseEnv","models","multiple","agents","executing","asynchronously","in","multiple","vectorized","sub-environments",".","A","call","to","`","poll","(",")","`","returns","observations","from","ready","agents","keyed","by","their","sub-environment","ID","and","agent","IDs",",","and","actions","for","those","agents","can","be","sent","back","via","`","send_actions","(",")","`",".","All","other","RLlib","supported","env","types","can","be","converted","to","BaseEnv",".","RLlib","handles","these","conversions","internally","in","RolloutWorker",",","for","example",":","gym.Env","=",">","rllib.VectorEnv","=",">","rllib.BaseEnv","rllib.MultiAgentEnv","(","is-a","gym.Env",")","=",">","rllib.VectorEnv","=",">","rllib.BaseEnv","rllib.ExternalEnv","=",">","rllib.BaseEnv","..","testcode",":",":",":","skipif",":","True","MyBaseEnv","=","...","env","=","MyBaseEnv","(",")","obs",",","rewards",",","terminateds",",","truncateds",",","infos",",","off_policy_actions","=","(","env.poll","(",")",")","print","(","obs",")","env.send_actions","(","{","``","env_0","''",":","{","``","car_0","''",":","0",",","``","car_1","''",":","1",",","}",",","...","}",")","obs",",","rewards",",","terminateds",",","truncateds",",","infos",",","off_policy_actions","=","(","env.poll","(",")",")","print","(","obs",")","print","(","terminateds",")","..","testoutput",":",":","{","``","env_0","''",":","{","``","car_0","''",":","[","2.4",",","1.6","]",",","``","car_1","''",":","[","3.4",",","-3.2","]",",","}",",","``","env_1","''",":","{","``","car_0","''",":","[","8.0",",","4.1","]",",","}",",","``","env_2","''",":","{","``","car_0","''",":","[","2.3",",","3.3","]",",","``","car_1","''",":","[","1.4",",","-0.2","]",",","``","car_3","''",":","[","1.2",",","0.1","]",",","}",",","}","{","``","env_0","''",":","{","``","car_0","''",":","[","4.1",",","1.7","]",",","``","car_1","''",":","[","3.2",",","-4.2","]",",","}",",","...","}","{","``","env_0","''",":","{","``","__all__","''",":","False",",","``","car_0","''",":","False",",","``","car_1","''",":","True",",","}",",","...","}"]
docstr: Returns the last observations, rewards, done- truncated flags and infos ...
  
  that were returned by the environment.
  
  Returns:
      The last observations, rewards, done- and truncated flags, and infos
      for each sub-environment.
docstr_tok: ["Returns","the","last","observations",",","rewards",",","done-","truncated","flags","and","infos","...","that","were","returned","by","the","environment",".","Returns",":","The","last","observations",",","rewards",",","done-","and","truncated","flags",",","and","infos","for","each","sub-environment","."]
code: def last(
      self,
  ) -> Tuple[
      MultiEnvDict,
      MultiEnvDict,
      MultiEnvDict,
      MultiEnvDict,
      MultiEnvDict,
  ]:
      """Returns the last observations, rewards, done- truncated flags and infos ...
  
      that were returned by the environment.
  
      Returns:
          The last observations, rewards, done- and truncated flags, and infos
          for each sub-environment.
      """
      logger.warning(
          "last has not been implemented for this environment."
      )
      return {}, {}, {}, {}, {}
  
imports: import logging
  from typing import Callable, Tuple, Optional, List, Dict, Any, TYPE_CHECKING, Union, Set
  import gymnasium
  import ray
  from ray.rllib.utils.annotations import Deprecated, DeveloperAPI, PublicAPI
  from ray.rllib.utils.typing import AgentID, EnvID, EnvType, MultiEnvDict
label_desc: Use image node_id 15 for calling the BaseEnv obj's underlying member method code with example usage: obj.last() and returns: dict,  dict,  dict,  dict,  dict