class_docstr: Returns random samples of the given action_spec.
  
  Note: the values in the info_spec (except for the log_probability) are random
    values that have nothing to do with the emitted actions.
  
  Note: The returned info.log_probabiliy will be an object matching the
  structure of action_spec, where each value is a tensor of size [batch_size].
class_docstr_tok: ["Returns","random","samples","of","the","given","action_spec",".","Note",":","the","values","in","the","info_spec","(","except","for","the","log_probability",")","are","random","values","that","have","nothing","to","do","with","the","emitted","actions",".","Note",":","The","returned","info.log_probabiliy","will","be","an","object","matching","the","structure","of","action_spec",",","where","each","value","is","a","tensor","of","size","[","batch_size","]","."]
code: def __init__(
      self,
      time_step_spec: ts.TimeStep,
      action_spec: types.NestedTensorSpec,
      *args,
      **kwargs,
  ):
      observation_and_action_constraint_splitter = kwargs.get(
          "observation_and_action_constraint_splitter", None
      )
      self._accepts_per_arm_features = kwargs.pop(
          "accepts_per_arm_features", False
      )
      self._stationary_mask = kwargs.pop("stationary_mask", None)
      if self._stationary_mask is not None:
          if not isinstance(action_spec, tensor_spec.BoundedTensorSpec):
              raise NotImplementedError(
                  "RandomTFPolicy only supports action constraints for "
                  "BoundedTensorSpec action specs."
              )
          assert (
              action_spec.dtype.is_integer
          ), "To use a stationary mask, action dtype must be integer."
          self._stationary_mask = tf.constant([self._stationary_mask])
          num_actions = action_spec.maximum - action_spec.minimum + 1
          assert self._stationary_mask.shape[-1] == num_actions, (
              "Stationary mask should have length equal to the number of actions, "
              "but we get {} and {}.".format(
                  num_actions, self._stationary_mask.shape[-1]
              )
          )
  
      if observation_and_action_constraint_splitter is not None:
          if not isinstance(action_spec, tensor_spec.BoundedTensorSpec):
              raise NotImplementedError(
                  "RandomTFPolicy only supports action constraints for "
                  "BoundedTensorSpec action specs."
              )
  
          action_spec = tensor_spec.from_spec(action_spec)
          action_spec = cast(tensor_spec.BoundedTensorSpec, action_spec)
          scalar_shape = action_spec.shape.rank == 0
          single_dim_shape = (
              action_spec.shape.rank == 1
              and action_spec.shape.dims == [1]
          )
  
          if not scalar_shape and not single_dim_shape:
              raise NotImplementedError(
                  "RandomTFPolicy only supports action constraints for action specs "
                  "shaped as () or (1,) or their equivalent list forms."
              )
  
      super(RandomTFPolicy, self).__init__(
          time_step_spec, action_spec, *args, **kwargs
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import cast
  import tensorflow
  from tf_agents.distributions import masked
  from tf_agents.policies import tf_policy
  from tf_agents.policies import utils
  from tf_agents.specs import bandit_spec_utils
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 1 to create a new RandomTFPolicy object from inherited base classes: tf_policy with example: obj = RandomTFPolicy(time_step_spec, action_spec)