class_docstr: A drifting linear environment dynamics.
  
  This is a drifting linear environment which computes rewards as:
  
  rewards(t) = observation(t) * observation_to_reward(t) + additive_reward(t)
  
  where `t` is the environment time. `observation_to_reward` slowly rotates over
  time. The environment time is incremented in the base class after the reward
  is computed. The parameters `observation_to_reward` and `additive_reward` are
  updated at each time step.
  In order to preserve the norm of the `observation_to_reward` (and the range
  of values of the reward) the drift is applied in form of rotations, i.e.,
  
  observation_to_reward(t) = R(theta(t)) * observation_to_reward(t - 1)
  
  where `theta` is the angle of the rotation. The angle is sampled from a
  provided input distribution.
class_docstr_tok: ["A","drifting","linear","environment","dynamics",".","This","is","a","drifting","linear","environment","which","computes","rewards","as",":","rewards","(","t",")","=","observation","(","t",")","*","observation_to_reward","(","t",")","+","additive_reward","(","t",")","where","`","t","`","is","the","environment","time",".","`","observation_to_reward","`","slowly","rotates","over","time",".","The","environment","time","is","incremented","in","the","base","class","after","the","reward","is","computed",".","The","parameters","`","observation_to_reward","`","and","`","additive_reward","`","are","updated","at","each","time","step",".","In","order","to","preserve","the","norm","of","the","`","observation_to_reward","`","(","and","the","range","of","values","of","the","reward",")","the","drift","is","applied","in","form","of","rotations",",","i.e.",",","observation_to_reward","(","t",")","=","R","(","theta","(","t",")",")","*","observation_to_reward","(","t","-","1",")","where","`","theta","`","is","the","angle","of","the","rotation",".","The","angle","is","sampled","from","a","provided","input","distribution","."]
code: def batch_size(self) -> types.Int:
      return tf.compat.dimension_value(
          self._observation_distribution.batch_shape[0]
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import gin
  import tensorflow
  from tf_agents.bandits.environments import non_stationary_stochastic_environment
  from tf_agents.specs import tensor_spec
  from tf_agents.typing import types
label_desc: Use image node_id 2 for calling the DriftingLinearDynamics obj's underlying member method code with example usage: obj.batch_size() and returns: tf