code: def design_space_count(grid, sample_num):
      counts = []
      for out in grid:
          vars_grid = [string_to_python(row[2]) for row in out]
          count = 1
          for var in vars_grid:
              count *= len(var)
          counts.append(count)
      counts = np.array(counts)
      counts = (counts / np.sum(counts) * sample_num).astype(int)
      counts[0] += sample_num - np.sum(counts)
      print(
          "Total sample size of each chunk of experiment space:", counts
      )
      return counts
  
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 11 for calling a global function with example usage: design_space_count(grid, sample_num) and returns: counts