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","."]
code: def _apply_action(
      self, action: types.NestedTensor
  ) -> types.NestedTensor:
      self._reward = self._environment_dynamics.reward(
          self._observation, self._env_time
      )
      tf.compat.v1.assign_add(
          self._env_time, self._environment_dynamics.batch_size
      )
      return common.index_with_actions(
          self._reward, tf.cast(action, dtype=tf.int32)
      )
  
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 3 for calling the NonStationaryStochasticEnvironment obj's underlying member method code with example usage: obj._apply_action(action) and returns: common