class_docstr: Abstract base class for representing constraints.
  
  The constraint class provides feasibility computation functionality for
  computing the probability of actions being feasible.
class_docstr_tok: ["Abstract","base","class","for","representing","constraints",".","The","constraint","class","provides","feasibility","computation","functionality","for","computing","the","probability","of","actions","being","feasible","."]
docstr: Initialization of the BaseConstraint class.
  
  Args:
    time_step_spec: A `TimeStep` spec of the expected time_steps.
    action_spec: A nest of `BoundedTensorSpec` representing the actions.
    name: Python str name of this constraint.
code: def __init__(
      self,
      time_step_spec: types.TimeStep,
      action_spec: types.BoundedTensorSpec,
      name: Optional[Text] = None,
  ):
      """Initialization of the BaseConstraint class.
  
      Args:
        time_step_spec: A `TimeStep` spec of the expected time_steps.
        action_spec: A nest of `BoundedTensorSpec` representing the actions.
        name: Python str name of this constraint.
      """
      super(BaseConstraint, self).__init__(name=name)
      if not isinstance(time_step_spec, ts.TimeStep):
          raise ValueError(
              "The `time_step_spec` must be an instance of `TimeStep`, but is `{}`.".format(
                  type(time_step_spec)
              )
          )
  
      self._time_step_spec = time_step_spec
      self._action_spec = action_spec
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import functools
  from typing import Callable, Iterable, Optional, Text
  import six
  import tensorflow
  import tensorflow_probability
  from tf_agents.bandits.policies import loss_utils
  from tf_agents.bandits.specs import utils
  from tf_agents.policies import utils
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 1 to create a new BaseConstraint object from inherited base classes: tf with example: obj = BaseConstraint(time_step_spec, action_spec, name)