code: def _check_uniform_actions(
      self, actions: np.ndarray, allowed_actions: Set[int]
  ) -> None:
      self.assertAllInSet(actions, allowed_actions)
      # Set tolerance in the chosen count to be 4 std.
      num_allow_actions = len(allowed_actions)
      prob = 1.0 / num_allow_actions
      batch_size = actions.shape[0]
      tol = 4.0 * np.sqrt(batch_size * prob * (1.0 - prob))
      expected_count = int(batch_size * prob)
      for action in list(allowed_actions):
          action_chosen_count = np.sum(actions == action)
          self.assertNear(
              action_chosen_count,
              expected_count,
              tol,
              msg=(
                  f"action: {action} is expected to be chosen between"
                  f" {expected_count - tol} and {expected_count + tol} times, but"
                  f" was actually chosen {action_chosen_count} times."
              ),
          )
  
imports: from typing import List, Optional, Set
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.bandits.policies import falcon_reward_prediction_policy
  from tf_agents.networks import network
  from tf_agents.policies import utils
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.utils import test_utils
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 1 for calling the FalconRewardPredictionPolicyTest obj's underlying member method code with example usage: obj._check_uniform_actions(actions, allowed_actions) without return types