docstr: Tests that the shape exceptions are properly raised.
docstr_tok: ["Tests","that","the","shape","exceptions","are","properly","raised","."]
code: def test_stratified_sampling_exception_raised(
      self, error_msg, n_samples, near, far, *shapes
  ):
      """Tests that the shape exceptions are properly raised."""
      if isinstance(near, tuple):
          near = np.ones(near, dtype=np.float32) * 1.0
      if isinstance(far, tuple):
          far = np.ones(far, dtype=np.float32) * 4.0
      self.assert_exception_is_raised(
          ray.sample_stratified_1d,
          error_msg,
          shapes,
          near=near,
          far=far,
          n_samples=n_samples,
      )
  
imports: import sys
  from absl import flags
  from absl.testing import flagsaver
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_graphics.geometry.representation import ray
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 2 for calling the RayTest obj's underlying member method code with example usage: obj.test_stratified_sampling_exception_raised(error_msg, n_samples, near, far) without return types