code: def uniform_reference_points(nobj, p=4, scaling=None):
      """Generate reference points uniformly on the hyperplane intersecting
      each axis at 1. The scaling factor is used to combine multiple layers of
      reference points.
      """
  
      def gen_refs_recursive(ref, nobj, left, total, depth):
          points = []
          if depth == nobj - 1:
              ref[depth] = left / total
              points.append(ref)
          else:
              for i in range(left + 1):
                  ref[depth] = i / total
                  points.extend(
                      gen_refs_recursive(
                          ref.copy(), nobj, left - i, total, depth + 1
                      )
                  )
          return points
  
      ref_points = numpy.array(
          gen_refs_recursive(numpy.zeros(nobj), nobj, p, p, 0)
      )
      if scaling is not None:
          ref_points *= scaling
          ref_points += (1 - scaling) / nobj
  
      return ref_points
  
imports: import bisect
  from collections import defaultdict, namedtuple
  from itertools import chain
  import math
  from operator import attrgetter, itemgetter
  import random
  import numpy
label_desc: Use image node_id 20 for calling a global function with example usage: uniform_reference_points(nobj, p, scaling) and returns: ref_points, points