class_docstr: Tests all the rotated bounding box related utilities.
class_docstr_tok: ["Tests","all","the","rotated","bounding","box","related","utilities","."]
docstr: Test for correctness of the intersect_lines operation.
docstr_tok: ["Test","for","correctness","of","the","intersect_lines","operation","."]
code: def test_intersect_line_segments(self):
      """Test for correctness of the intersect_lines operation."""
      key = jax.random.PRNGKey(0)
      key, subkey = jax.random.split(key)
      lines1 = jax.random.uniform(subkey, (100, 2, 2))
      lines2 = jax.random.uniform(key, (100, 2, 2))
      intersect_line_segments = jax.jit(
          jax.vmap(box_utils.intersect_line_segments)
      )
      intersections = intersect_line_segments(lines1, lines2)
      self.assertEqual(intersections.shape, (100, 2))
  
      expected_intersections = []
      for i in range(len(lines1)):
          line1 = geometry.LineString(lines1[i])
          line2 = geometry.LineString(lines2[i])
          it = line1.intersection(line2)
          it_coord = (
              it.coords[0]
              if isinstance(it, geometry.Point)
              else jnp.asarray([jnp.nan] * 2)
          )
          expected_intersections.append(it_coord)
  
      np.testing.assert_allclose(
          intersections, expected_intersections, atol=1e-7
      )
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  import jax.numpy
  import numpy
  from scenic.model_lib.base_models import box_utils
  from shapely import geometry
label_desc: Use image node_id 4 for calling the RBoxUtilsTest obj's underlying member method code with example usage: obj.test_intersect_line_segments() without return types