code: def test_lips2_disjoint():
      phi = intvol.Lips2d
      box1, box2, edge1, edge2 = nonintersecting_boxes((40, 40))
      c = np.indices((40, 40)).astype(np.float64)
      # Test N dimensional coordinates (N=10)
      d = np.random.standard_normal((10, 40, 40))
      # Test rotation causes no change in volumes
      U = randorth(p=6)[0:2]
      e = np.dot(U.T, c.reshape((c.shape[0], np.prod(c.shape[1:]))))
      e.shape = (e.shape[0],) + c.shape[1:]
      assert_almost_equal(
          phi(c, box1 + box2), phi(c, box1) + phi(c, box2)
      )
      assert_almost_equal(
          phi(d, box1 + box2), phi(d, box1) + phi(d, box2)
      )
      assert_almost_equal(
          phi(e, box1 + box2), phi(e, box1) + phi(e, box2)
      )
      assert_almost_equal(phi(e, box1 + box2), phi(c, box1 + box2))
      assert_almost_equal(
          phi(e, box1 + box2),
          np.array(
              [
                  elsym([e[1] - e[0] - 1 for e in edge1], i)
                  for i in range(3)
              ]
          )
          + np.array(
              [
                  elsym([e[1] - e[0] - 1 for e in edge2], i)
                  for i in range(3)
              ]
          ),
      )
      pytest.raises(ValueError, phi, c[..., None], box1)
      pytest.raises(ValueError, phi, c[:, :, 1], box1)
  
imports: from itertools import combinations
  import numpy
  import numpy.linalg
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_equal
  from ..None import intvol
label_desc: Use image node_id 21 for calling a global function with example usage: test_lips2_disjoint() without return types