code: def test_batch_shape_invariant_to_scaling():
      """
      test that scaling deals well with batches as tensors and numpy matrices in terms of shape
      """
      action_space = Box(
          np.array([-10.0, -5.0, -1.0]), np.array([10.0, 3.0, 2.0])
      )
  
      tensor = tf.constant(1.0, shape=[2, 3])
      matrix = np.ones((2, 3))
  
      assert scale_action(action_space, tensor).shape == (2, 3)
      assert scale_action(action_space, matrix).shape == (2, 3)
  
      assert unscale_action(action_space, tensor).shape == (2, 3)
      assert unscale_action(action_space, matrix).shape == (2, 3)
  
imports: import tensorflow
  import numpy
  from gym.spaces.box import Box
  from stable_baselines.common.math_util import discount_with_boundaries, scale_action, unscale_action
label_desc: Use image node_id 4 for calling a global function with example usage: test_batch_shape_invariant_to_scaling() without return types