docstr: Generates the parameter combinations for each requested trial
  :return:
docstr_tok: ["Generates","the","parameter","combinations","for","each","requested","trial",":","return",":"]
code: def __generate_trials(self):
      """
      Generates the parameter combinations for each requested trial
      :return:
      """
      flat_params = self.__flatten_params(self.params)
  
      # permute for grid search
      if self.method == "grid_search":
          self.trials = list(itertools.product(*flat_params))
  
          if self.nb_iterations is not None:
              self.trials = self.trials[0 : self.nb_iterations]
  
      if self.method == "random_search":
          self.trials = self.__generate_random_search_trials(
              flat_params
          )
  
file_path: test-tube/test_tube/hyperopt.py
imports: import itertools
  import json
  import random
label_desc: Use image node_id 9 for calling the HyperParamOptimizer obj's underlying member method code with example usage: obj.__generate_trials() without return types