code: def choice_n(categories, min_items, max_items):
      """
      Sample a subset from a list
  
      :param categories: A list to be sampled
      :param min_items: minimum number of items to be sampled
      :param max_items: maximum number of items to be sampled
      """
      return tune.sample_from(
          lambda spec: list(
              np.random.choice(
                  categories,
                  size=np.random.randint(low=min_items, high=max_items),
                  replace=False,
              )
          )
      )
  
file_path: analytics-zoo/pyzoo/zoo/orca/automl/hp.py
imports: import ray.tune
  import numpy
label_desc: Use image node_id 10 for calling a global function with example usage: choice_n(categories, min_items, max_items) and returns: tune