docstr: Ensure that the action spec is set correctly.
docstr_tok: ["Ensure","that","the","action","spec","is","set","correctly","."]
code: def testActionSpec(self, observation_shape, action_shape, batch_size):
      """Ensure that the action spec is set correctly."""
      interval = 3
      env = get_deterministic_gaussian_non_stationary_environment(
          observation_shape, action_shape, batch_size, interval
      )
  
      self.evaluate(tf.compat.v1.global_variables_initializer())
      self.assertEqual(env.action_spec().maximum, action_shape[0] - 1)
  
file_path: agents/tf_agents/bandits/environments/piecewise_stochastic_environment_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import tensorflow
  import tensorflow_probability
  from tf_agents.bandits.environments import piecewise_stochastic_environment
label_desc: Use image node_id 2 for calling the PiecewiseStochasticEnvironmentTest obj's underlying member method code with example usage: obj.testActionSpec(observation_shape, action_shape, batch_size) without return types