code: def grid2list_sample(grid, sample=10):
      configs = []
      while len(configs) < sample:
          config = []
          for grid_temp in grid:
              config.append(random.choice(grid_temp))
          if config not in configs:
              configs.append(config)
      return configs
  
imports: import argparse
  import copy
  import csv
  import os
  import os.path
  import random
  import numpy
  import yaml
  import graphgym.contrib
  from graphgym.utils.comp_budget import match_baseline_cfg
  from graphgym.utils.io import makedirs_rm_exist, string_to_python
label_desc: Use image node_id 5 for calling a global function with example usage: grid2list_sample(grid, sample) and returns: configs