code: def test_direction_proposals():
      proposals = [
          generate_cube_oriented_direction,
          generate_random_direction,
          generate_region_oriented_direction,
          generate_region_random_direction,
      ]
  
      points = np.random.uniform(size=(100, 10))
      minvol = 1.0
  
      scale = 1.0  # np.random.uniform()
      for layer in AffineLayer, ScalingLayer:
          transformLayer = layer()
          transformLayer.optimize(points, points)
          for region_class in (
              MLFriends,
              RobustEllipsoidRegion,
              SimpleRegion,
          ):
              region = region_class(points, transformLayer)
              r, f = region.compute_enlargement(
                  minvol=minvol, nbootstraps=30
              )
              region.maxradiussq = r
              region.enlarge = f
              region.create_ellipsoid(minvol=minvol)
  
              for prop in proposals:
                  print(
                      "test of proposal:",
                      prop,
                      "with region:",
                      region_class,
                      "layer:",
                      layer,
                  )
                  directions = prop(points, region, scale=scale)
                  assert directions.shape == points.shape, (
                      directions.shape,
                      points.shape,
                  )
  
file_path: ultranest/tests/test_popstepsampling.py
imports: import numpy
  from ultranest import ReactiveNestedSampler
  from ultranest.popstepsampler import PopulationSliceSampler, PopulationRandomWalkSampler
  from ultranest.popstepsampler import generate_cube_oriented_direction, generate_random_direction, generate_cube_oriented_direction_scaled
  from ultranest.popstepsampler import generate_region_oriented_direction, generate_region_random_direction
  from ultranest.mlfriends import AffineLayer, ScalingLayer, MLFriends, RobustEllipsoidRegion, SimpleRegion
label_desc: Use image node_id 6 for calling a global function with example usage: test_direction_proposals() without return types