code: def testSomeSmallNumSamples(self):
      # When some action has a much smaller number of samples, it should be chosen
      # more frequently than other actions.
      num_samples_list = []
      for k in range(3):
          num_samples_list.append(
              tf.compat.v2.Variable(
                  tf.zeros([], dtype=tf.int32),
                  name="num_samples_{}".format(k),
              )
          )
      num_samples_list[0].assign_add(tf.int32.max - 10)
      num_samples_list[1].assign_add(1)
      num_samples_list[2].assign_add(tf.int32.max - 10)
      policy = boltzmann_reward_policy.BoltzmannRewardPredictionPolicy(
          self._time_step_spec,
          self._action_spec,
          reward_network=DummyNet(self._obs_spec),
          boltzmann_gumbel_exploration_constant=10.0,
          num_samples_list=num_samples_list,
          emit_policy_info=(utils.InfoFields.PREDICTED_REWARDS_MEAN,),
      )
      batch_size = 3000
      observations = tf.constant(
          [[1, 2]] * batch_size, dtype=tf.float32
      )
      time_step = ts.restart(observations, batch_size=batch_size)
      action_step = policy.action(time_step, seed=1)
      # Initialize all variables
      self.evaluate(tf.compat.v1.global_variables_initializer())
      actions = self.evaluate(action_step.action)
      self.assertAllInSet(actions, [0, 1, 2])
      action_counts = {
          action: np.sum(actions == action) for action in range(3)
      }
      self.assertAllLess(
          [action_counts[0], action_counts[2]], action_counts[1]
      )
  
imports: import numpy
  import tensorflow
  from tf_agents.bandits.policies import boltzmann_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 7 for calling the BoltzmannRewardPredictionPolicyTest obj's underlying member method code with example usage: obj.testSomeSmallNumSamples() without return types