code: def testComputeFeasibilityMaskWithActionMask(self):
      observation_spec = tensor_spec.TensorSpec([2], tf.float32)
      time_step_spec = ts.time_step_spec(observation_spec)
      action_spec = tensor_spec.BoundedTensorSpec((), tf.int32, 0, 2)
      constraint_net = DummyNet(observation_spec, action_spec)
      neural_constraint = constraints.NeuralConstraint(
          time_step_spec, action_spec, constraint_network=constraint_net
      )
  
      observations = tf.constant([[1, 2], [3, 4]], dtype=tf.float32)
      action_mask = tf.constant([[0, 0, 1], [0, 1, 0]], dtype=tf.int32)
      feasibility_prob = constraints.compute_feasibility_probability(
          observations,
          [neural_constraint],
          batch_size=2,
          num_actions=3,
          action_mask=action_mask,
      )
      self.assertAllEqual(
          self.evaluate(tf.cast(action_mask, tf.float32)),
          self.evaluate(feasibility_prob),
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  from tf_agents.bandits.networks import global_and_arm_feature_network
  from tf_agents.bandits.policies import constraints
  from tf_agents.bandits.specs import utils
  from tf_agents.networks import network
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.utils import common
label_desc: Use image node_id 2 for calling the ConstraintFeasibilityTest obj's underlying member method code with example usage: obj.testComputeFeasibilityMaskWithActionMask() without return types