code: def test_island_point_selector():
      K = 10
      ndim = 2
      self_selector = IslandPopulationRandomLivepointSelector(1)
      selector = IslandPopulationRandomLivepointSelector(5)
      imbalanced_selector = IslandPopulationRandomLivepointSelector(9)
      for i in range(100):
          us = np.random.normal(size=(K, ndim))
          Ls = np.random.normal(size=K)
          Lmin = Ls.min()
          j1 = np.argmin(Ls)
          j2 = selector(us, Ls, Lmin)
          assert j1 == self_selector(us, Ls, Lmin)
          if j1 >= 5:
              assert j2 >= 5, (j1, j2)
          if j1 < 5:
              assert j2 < 5, (j1, j2)
          if j1 == 9:
              assert j1 == imbalanced_selector(us, Ls, Lmin)
          else:
              assert imbalanced_selector(us, Ls, Lmin) < 9
  
      np.random.seed(421)
      leaked = False
      selector = IslandPopulationRandomLivepointSelector(5, 0.1)
      for i in range(100):
          j1 = np.argmin(Ls)
          j2 = selector(us, Ls, Lmin)
          if j1 >= 5 and j2 >= 5 or j1 < 5 and j2 < 5:
              pass
          else:
              # leak, as expected
              leaked = True
              break
      assert leaked
  
imports: import numpy
  from ultranest.mlfriends import ScalingLayer, AffineLayer, MLFriends
  from ultranest import ReactiveNestedSampler
  from ultranest.stepsampler import RegionMHSampler, CubeMHSampler, CubeSliceSampler, RegionSliceSampler, SpeedVariableRegionSliceSampler, RegionBallSliceSampler
  from ultranest.stepsampler import generate_region_random_direction, ellipsoid_bracket, crop_bracket_at_unit_cube
  from ultranest.pathsampler import SamplingPathStepSampler
  from ultranest.stepsampler import select_random_livepoint, IslandPopulationRandomLivepointSelector
  from numpy.testing import assert_allclose
label_desc: Use image node_id 18 for calling a global function with example usage: test_island_point_selector() without return types