code: def compute_feasibility_probability(
      observation: types.NestedTensor,
      constraints: Iterable[BaseConstraint],
      batch_size: types.Int,
      num_actions: int,
      action_mask: Optional[types.Tensor] = None,
  ) -> types.Float:
      """Helper function to compute the action feasibility probability."""
      feasibility_prob = tf.ones([batch_size, num_actions])
      if action_mask is not None:
          feasibility_prob = tf.cast(action_mask, tf.float32)
      for c in constraints:
          # We assume the constraints are independent.
          action_feasibility = c(observation)
          feasibility_prob *= action_feasibility
      return feasibility_prob
  
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 for calling a global function with example usage: compute_feasibility_probability(observation, constraints, batch_size, num_actions, action_mask) and returns: feasibility_prob