code: def bench_lips2d():
      np.random.seed(20111001)
      phi = intvol.Lips2d
      EC2d = intvol.EC2d
      repeat = 4
      bx_sz = 500
      box1, box2, edge1, edge2 = nonintersecting_boxes((bx_sz,) * 2)
      c = np.indices(box1.shape).astype(np.float64)
      sys.stdout.flush()
      print("\nIntrinsic volumes 2D")
      print("--------------------")
      print(f"Box1 {npt.measure('phi(c,box1)', repeat):6.2f}")
      print(f"Box2 {npt.measure('phi(c, box2)', repeat):6.2f}")
      print(f"Box1+2 {npt.measure('phi(c, box1 + box2)', repeat):6.2f}")
      d = np.random.standard_normal((10,) + (bx_sz,) * 2)
      print(
          f"Box1+2 d {npt.measure('phi(d, box1 + box2)', repeat):6.2f}"
      )
      U = randorth(p=6)[0:2]
      e = np.dot(U.T, c.reshape((c.shape[0], -1)))
      e.shape = (e.shape[0],) + c.shape[1:]
      print(
          f"Box1+2 e {npt.measure('phi(e, box1 + box2)', repeat):6.2f}"
      )
      print(
          f"Box1+2 EC {npt.measure('EC2d(box1 + box2)', repeat):6.2f}"
      )
      sys.stdout.flush()
  
file_path: nipy/nipy/algorithms/statistics/bench/bench_intvol.py
imports: import sys
  import numpy
  import numpy.testing
  from ..None import intvol
  from ..tests.test_intrinsic_volumes import nonintersecting_boxes, randorth
label_desc: Use image node_id 2 for calling a global function with example usage: bench_lips2d() without return types