code: def test_compute_line_intersection_point():
      # intersecting lines
      line1 = (0, 0, 1, 0)
      line2 = (0.5, -1, 0.5, 1)
      point = ia.compute_line_intersection_point(
          line1[0],
          line1[1],
          line1[2],
          line1[3],
          line2[0],
          line2[1],
          line2[2],
          line2[3],
      )
      assert np.allclose(point[0], 0.5)
      assert np.allclose(point[1], 0)
  
      # intersection point outside of defined interval of one line, should not change anything
      line1 = (0, 0, 1, 0)
      line2 = (0.5, -1, 0.5, -0.5)
      point = ia.compute_line_intersection_point(
          line1[0],
          line1[1],
          line1[2],
          line1[3],
          line2[0],
          line2[1],
          line2[2],
          line2[3],
      )
      assert np.allclose(point[0], 0.5)
      assert np.allclose(point[1], 0)
  
      # touching lines
      line1 = (0, 0, 1, 0)
      line2 = (0.5, -1, 0.5, 0)
      point = ia.compute_line_intersection_point(
          line1[0],
          line1[1],
          line1[2],
          line1[3],
          line2[0],
          line2[1],
          line2[2],
          line2[3],
      )
      assert np.allclose(point[0], 0.5)
      assert np.allclose(point[1], 0)
  
      # parallel, not intersecting lines
      line1 = (0, 0, 1, 0)
      line2 = (0, -0.1, 1, -0.1)
      point = ia.compute_line_intersection_point(
          line1[0],
          line1[1],
          line1[2],
          line1[3],
          line2[0],
          line2[1],
          line2[2],
          line2[3],
      )
      assert point is False
  
      # parallel and overlapping lines (infinite intersection points)
      line1 = (0, 0, 1, 0)
      line2 = (0.1, 0, 1, 0)
      point = ia.compute_line_intersection_point(
          line1[0],
          line1[1],
          line1[2],
          line1[3],
          line2[0],
          line2[1],
          line2[2],
          line2[3],
      )
      assert point is False
  
imports: from __future__ import print_function, division, absolute_import
  import time
  import warnings
  import sys
  import matplotlib
  import numpy
  import six.moves
  import cv2
  import imgaug
  from imgaug import dtypes
  import imgaug.random
  from imgaug.testutils import assertWarns
label_desc: Use image node_id 24 for calling a global function with example usage: test_compute_line_intersection_point() without return types