code: def testWrongActionsRaiseError(self):
      action_spec = tensor_spec.BoundedTensorSpec(
          (5, 6, 7), tf.float32, 0, 2
      )
      with self.assertRaisesRegex(
          NotImplementedError,
          "action_spec must be a BoundedTensorSpec of integer type.*",
      ):
          bern_thompson_sampling_policy.BernoulliThompsonSamplingPolicy(
              self._time_step_spec,
              action_spec,
              alpha=_prepare_alphas(self._action_spec),
              beta=_prepare_betas(self._action_spec),
          )
  
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 4 for calling the BernoulliThompsonSamplingPolicyTest obj's underlying member method code with example usage: obj.testWrongActionsRaiseError() without return types