docstr: Test the Jacobian of the intersection_ray_sphere function.
docstr_tok: ["Test","the","Jacobian","of","the","intersection_ray_sphere","function","."]
code: def test_intersection_ray_sphere_jacobian_random(self):
      """Test the Jacobian of the intersection_ray_sphere function."""
      tensor_size = np.random.randint(3)
      tensor_shape = np.random.randint(
          1, 10, size=(tensor_size)
      ).tolist()
      sphere_center_init = np.random.uniform(0.0, 1.0, size=(3,))
      sphere_radius_init = np.random.uniform(10.0, 11.0, size=(1,))
      ray_init = np.random.uniform(size=tensor_shape + [3])
      ray_init /= np.linalg.norm(ray_init, axis=-1, keepdims=True)
      point_on_ray_init = np.random.uniform(
          0.0, 1.0, size=tensor_shape + [3]
      )
  
      def intersection_ray_sphere_position(
          sphere_center, sphere_radius, input_ray, point_on_ray
      ):
          y_p, _ = ray.intersection_ray_sphere(
              sphere_center, sphere_radius, input_ray, point_on_ray
          )
          return y_p
  
      def intersection_ray_sphere_normal(
          sphere_center, sphere_radius, input_ray, point_on_ray
      ):
          _, y_n = ray.intersection_ray_sphere(
              sphere_center, sphere_radius, input_ray, point_on_ray
          )
          return y_n
  
      self.assert_jacobian_is_correct_fn(
          intersection_ray_sphere_position,
          [
              sphere_center_init,
              sphere_radius_init,
              ray_init,
              point_on_ray_init,
          ],
      )
      self.assert_jacobian_is_correct_fn(
          intersection_ray_sphere_normal,
          [
              sphere_center_init,
              sphere_radius_init,
              ray_init,
              point_on_ray_init,
          ],
      )
  
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 18 for calling the RayTest obj's underlying member method code with example usage: obj.test_intersection_ray_sphere_jacobian_random() and returns: y_p, y_n