class_docstr: Class for representing a trainable relative quantile constraint.
  
  This constraint class implements a relative quantile constraint such as
  ```
  Q_tau(action) >= Q_tau(baseline_action)
  ```
  or
  ```
  Q_tau(action) <= Q_tau(baseline_action)
  ```
class_docstr_tok: ["Class","for","representing","a","trainable","relative","quantile","constraint",".","This","constraint","class","implements","a","relative","quantile","constraint","such","as","``","`","Q_tau","(","action",")",">","=","Q_tau","(","baseline_action",")","``","`","or","``","`","Q_tau","(","action",")","<","=","Q_tau","(","baseline_action",")","``","`"]
docstr: Returns the probability of input actions being feasible.
code: def __call__(self, observation, actions=None):
      """Returns the probability of input actions being feasible."""
      predicted_quantiles, _ = self._constraint_network(
          observation, training=False
      )
      batch_dims = nest_utils.get_outer_shape(
          observation, self._time_step_spec.observation
      )
  
      if self._baseline_action_fn is not None:
          baseline_action = self._baseline_action_fn(observation)
          baseline_action.shape.assert_is_compatible_with(batch_dims)
      else:
          baseline_action = tf.zeros(batch_dims, dtype=tf.int32)
  
      predicted_quantiles_for_baseline_actions = (
          common.index_with_actions(
              predicted_quantiles,
              tf.cast(baseline_action, dtype=tf.int32),
          )
      )
      predicted_quantiles_for_baseline_actions = (
          self._reshape_and_broadcast(
              predicted_quantiles_for_baseline_actions,
              tf.shape(predicted_quantiles),
          )
      )
      is_satisfied = self._comparator_fn(
          predicted_quantiles, predicted_quantiles_for_baseline_actions
      )
      return tf.cast(is_satisfied, tf.float32)
  
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 2 for calling the RelativeQuantileConstraint obj's underlying member method code with example usage: obj.__call__(observation, actions) and returns: tf