code: def test_horizontal():
      (c1, _, ax1), (c2, _, ax2) = box_line_intersection(
          np.array([0.5, 0.5]), np.array([0, 1.0])
      )
      print((c1, ax1), (c2, ax2))
      assert ax1 == 1
      np.testing.assert_allclose(c1, [0.5, 0])
      assert ax2 == 1
      np.testing.assert_allclose(c2, [0.5, 1])
  
      (c1, _, ax1), (c2, _, ax2) = box_line_intersection(
          np.array([0.3, 0.3]), np.array([1, 0.0])
      )
      print((c1, ax1), (c2, ax2))
      assert ax1 == 0
      np.testing.assert_allclose(c1, [0, 0.3])
      assert ax2 == 0
      np.testing.assert_allclose(c2, [1, 0.3])
  
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 1 for calling a global function with example usage: test_horizontal() without return types