code: def test_corner():
      start, direction = np.array([0.6, 0.5]), np.array([0.4, 0.5])
      print("starting ray:", start, direction)
      (c1, _, ax1), (c2, _, ax2) = box_line_intersection(
          start, direction
      )
      print((c1, ax1), (c2, ax2))
      np.testing.assert_allclose(c2, [1, 1])
      start = c2
      direction[ax2] *= -1
      print("restarting ray:", start, direction)
      (c1, _, ax1), (c2, _, ax2) = box_line_intersection(
          start, direction
      )
      print((c1, ax1), (c2, ax2))
      np.testing.assert_allclose(c1, [1.0, 1.0])
      np.testing.assert_allclose(c2, [0.2, 0.0])
      start = c2
      direction[ax2] *= -1
      (c1, _, ax1), (c2, _, ax2) = box_line_intersection(
          start, direction
      )
      print((c1, ax1), (c2, ax2))
      np.testing.assert_allclose(c1, [0.2, 0.0])
      np.testing.assert_allclose(c2, [0.0, 0.25])
  
file_path: ultranest/tests/test_samplingpath.py
imports: import numpy
  import matplotlib.pyplot
  from ultranest.mlfriends import AffineLayer, MLFriends
  from ultranest.samplingpath import SamplingPath, ContourSamplingPath
  from ultranest.samplingpath import box_line_intersection, nearest_box_intersection_line, linear_steps_with_reflection, angle, get_sphere_tangents, norm
  from numpy.testing import assert_allclose
label_desc: Use image node_id 2 for calling a global function with example usage: test_corner() without return types