class_docstr: Implements a general non-stationary environment.
  
  This environment keeps a Tensorflow variable (`env_time`) to keep track of the
  current timme. This is incremented after every update of the reward tensor.
  The `EnvironmentDynamics` object passed to the constructor determines how
  observations and rewards are computed for the current time.
class_docstr_tok: ["Implements","a","general","non-stationary","environment",".","This","environment","keeps","a","Tensorflow","variable","(","`","env_time","`",")","to","keep","track","of","the","current","timme",".","This","is","incremented","after","every","update","of","the","reward","tensor",".","The","`","EnvironmentDynamics","`","object","passed","to","the","constructor","determines","how","observations","and","rewards","are","computed","for","the","current","time","."]
docstr: Initializes a non-stationary environment with the given dynamics.
  
  Args:
    environment_dynamics: An instance of `EnvironmentDynamics` defining how
      the environment evolves over time.
docstr_tok: ["Initializes","a","non-stationary","environment","with","the","given","dynamics",".","Args",":","environment_dynamics",":","An","instance","of","`","EnvironmentDynamics","`","defining","how","the","environment","evolves","over","time","."]
code: def __init__(self, environment_dynamics: EnvironmentDynamics):
      """Initializes a non-stationary environment with the given dynamics.
  
      Args:
        environment_dynamics: An instance of `EnvironmentDynamics` defining how
          the environment evolves over time.
      """
      self._env_time = tf.compat.v2.Variable(
          0, trainable=False, name="env_time", dtype=tf.int64
      )
      self._environment_dynamics = environment_dynamics
      observation_spec = environment_dynamics.observation_spec
      self._observation = _create_variable_from_spec_nest(
          observation_spec, environment_dynamics.batch_size
      )
      time_step_spec = time_step.time_step_spec(observation_spec)
      super(NonStationaryStochasticEnvironment, self).__init__(
          time_step_spec=time_step_spec,
          action_spec=environment_dynamics.action_spec,
          batch_size=environment_dynamics.batch_size,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import gin
  import tensorflow
  from tf_agents.bandits.environments import bandit_tf_environment
  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 1 to create a new NonStationaryStochasticEnvironment object from inherited base classes: bte with example: obj = NonStationaryStochasticEnvironment(environment_dynamics)