class_docstr: Abstract base class for Python RL environments.
  
  Observations and valid actions are described with `ArraySpec`s, defined in
  the `specs` module.
  
  If the environment can run multiple steps at the same time and take a batched
  set of actions and return a batched set of observations, it should overwrite
  the property batched to True.
  
  Environments are assumed to auto reset once they reach the end of the episode,
  if prefer that the base class handle auto_reset set `handle_auto_reset=True`.
class_docstr_tok: ["Abstract","base","class","for","Python","RL","environments",".","Observations","and","valid","actions","are","described","with","`","ArraySpec","`","s",",","defined","in","the","`","specs","`","module",".","If","the","environment","can","run","multiple","steps","at","the","same","time","and","take","a","batched","set","of","actions","and","return","a","batched","set","of","observations",",","it","should","overwrite","the","property","batched","to","True",".","Environments","are","assumed","to","auto","reset","once","they","reach","the","end","of","the","episode",",","if","prefer","that","the","base","class","handle","auto_reset","set","`","handle_auto_reset=True","`","."]
docstr: Returns the `state` of the environment.
  
  The `state` contains everything required to restore the environment to the
  current configuration. This can contain e.g.
    - The current time_step.
    - The number of steps taken in the environment (for finite horizon MDPs).
    - Hidden state (for POMDPs).
  
  Callers should not assume anything about the contents or format of the
  returned `state`. It should be treated as a token that can be passed back to
  `set_state()` later.
  
  Note that the returned `state` handle should not be modified by the
  environment later on, and ensuring this (e.g. using copy.deepcopy) is the
  responsibility of the environment.
  
  Returns:
    state: The current state of the environment.
docstr_tok: ["Returns","the","`","state","`","of","the","environment",".","The","`","state","`","contains","everything","required","to","restore","the","environment","to","the","current","configuration",".","This","can","contain","e.g",".","-","The","current","time_step",".","-","The","number","of","steps","taken","in","the","environment","(","for","finite","horizon","MDPs",")",".","-","Hidden","state","(","for","POMDPs",")",".","Callers","should","not","assume","anything","about","the","contents","or","format","of","the","returned","`","state","`",".","It","should","be","treated","as","a","token","that","can","be","passed","back","to","`","set_state","(",")","`","later",".","Note","that","the","returned","`","state","`","handle","should","not","be","modified","by","the","environment","later","on",",","and","ensuring","this","(","e.g",".","using","copy.deepcopy",")","is","the","responsibility","of","the","environment",".","Returns",":","state",":","The","current","state","of","the","environment","."]
code: def get_state(self) -> Any:
      """Returns the `state` of the environment.
  
      The `state` contains everything required to restore the environment to the
      current configuration. This can contain e.g.
        - The current time_step.
        - The number of steps taken in the environment (for finite horizon MDPs).
        - Hidden state (for POMDPs).
  
      Callers should not assume anything about the contents or format of the
      returned `state`. It should be treated as a token that can be passed back to
      `set_state()` later.
  
      Note that the returned `state` handle should not be modified by the
      environment later on, and ensuring this (e.g. using copy.deepcopy) is the
      responsibility of the environment.
  
      Returns:
        state: The current state of the environment.
      """
      raise NotImplementedError(
          "This environment has not implemented `get_state()`."
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  from typing import Any, Optional, Text
  import numpy
  import six
  from tf_agents.specs import array_spec
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import common
label_desc: Use image node_id 19 for calling the PyEnvironment obj's underlying member method code with example usage: obj.get_state() without return types