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: Defines the discount that are returned by `step()`.
  
  Override this method to define an environment that uses non-standard
  discount values, for example an environment with array-valued discounts.
  
  Returns:
    An `ArraySpec`, or a nested dict, list or tuple of `ArraySpec`s.
docstr_tok: ["Defines","the","discount","that","are","returned","by","`","step","(",")","`",".","Override","this","method","to","define","an","environment","that","uses","non-standard","discount","values",",","for","example","an","environment","with","array-valued","discounts",".","Returns",":","An","`","ArraySpec","`",",","or","a","nested","dict",",","list","or","tuple","of","`","ArraySpec","`","s","."]
code: def discount_spec(self) -> types.NestedArraySpec:
      """Defines the discount that are returned by `step()`.
  
      Override this method to define an environment that uses non-standard
      discount values, for example an environment with array-valued discounts.
  
      Returns:
        An `ArraySpec`, or a nested dict, list or tuple of `ArraySpec`s.
      """
      return array_spec.BoundedArraySpec(
          shape=(),
          dtype=np.float32,
          minimum=0.0,
          maximum=1.0,
          name="discount",
      )
  
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 8 for calling the PyEnvironment obj's underlying member method code with example usage: obj.discount_spec() and returns: array_spec