code: def get_buckets(min_length, max_length, bucket_count):
      """
      Get bucket by length.
      """
      if bucket_count <= 0:
          return [max_length]
      unit_length = int((max_length - min_length) // (bucket_count))
      buckets = [
          min_length + unit_length * (i + 1)
          for i in range(0, bucket_count)
      ]
      buckets[-1] = max_length
      return buckets
  
file_path: nni/examples/trials/weight_sharing/ga_squad/data.py
imports: import csv
  import json
  from random import shuffle
  import numpy
label_desc: Use image node_id 11 for calling a global function with example usage: get_buckets(min_length, max_length, bucket_count) and returns: buckets, list