code: def testPredictedRewards(self, dtype):
      tf.compat.v1.set_random_seed(1)
      policy = (
          bern_thompson_sampling_policy.BernoulliThompsonSamplingPolicy(
              self._time_step_spec,
              self._action_spec,
              alpha=_prepare_alphas(self._action_spec, dtype=dtype),
              beta=_prepare_betas(self._action_spec, dtype=dtype),
              emit_policy_info=(
                  "predicted_rewards_mean",
                  "predicted_rewards_sampled",
              ),
          )
      )
      time_step = ts.TimeStep(
          ts.StepType.FIRST, 0.0, 0.0, observation=1.0
      )
      action_step = policy.action(time_step, seed=1)
      self.assertEqual(action_step.action.shape.as_list(), [1])
      self.assertEqual(action_step.action.dtype, tf.int32)
      # Initialize all variables
      self.evaluate(tf.compat.v1.global_variables_initializer())
      predicted_rewards_expected_array = np.array([[0.5, 0.5, 0.5]])
      p_info = self.evaluate(action_step.info)
      self.assertAllClose(
          p_info.predicted_rewards_mean,
          predicted_rewards_expected_array,
      )
      self.assertEqual(
          list(p_info.predicted_rewards_sampled.shape), [1, 3]
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.bandits.policies import bernoulli_thompson_sampling_policy
  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 10 for calling the BernoulliThompsonSamplingPolicyTest obj's underlying member method code with example usage: obj.testPredictedRewards(dtype) without return types