code: def recalculate_n_sampling(search_space, n_sampling):
      """
      Only process n_sampling.
  
      :param n_sampling: Number of trials to evaluate in total.
      """
      search_count = [
          len(v["grid_search"])
          for _, v in search_space.items()
          if isinstance(v, dict)
      ]
      assist_num = 1
      if search_count:
          for val in search_count:
              assist_num *= val
  
      n_sampling /= assist_num
      # TODO Number of threads specified by the user corresponds to n_sampling and give warning.
      return math.ceil(n_sampling)
  
imports: import math
label_desc: Use image node_id 1 for calling a global function with example usage: recalculate_n_sampling(search_space, n_sampling) and returns: math