class_docstr: This is the base class for all optimization algorithms. These are the core algorithms which produce
  recommendations on what to try next.
code: def convertTrialsToResults(self, hyperparameterSpace, trials):
      results = []
      for trialIndex, trial in enumerate(trials.trials):
          data = {
              "trial": trialIndex,
              "status": trial["result"]["status"],
              "loss": trial["result"]["loss"],
              "log": "",
              "time": abs(
                  (
                      trial["book_time"] - trial["refresh_time"]
                  ).total_seconds()
              ),
          }
  
          params = trial["misc"]["vals"]
          for param in Hyperparameter(
              hyperparameterSpace
          ).getFlatParameters():
              key = param.hyperoptVariableName
  
              if len(params[key]) == 1:
                  value = params[key][0]
                  if "enum" in param.config:
                      value = param.config["enum"][value]
  
                  data[param.name] = value
              else:
                  data[param.name] = ""
  
          results.append(data)
      return results
  
file_path: hypermax/hypermax/algorithms/optimization_algorithm_base.py
imports: import hyperopt
  import datetime
  from hypermax.hyperparameter import Hyperparameter
  import json
  import copy
  from pprint import pprint
label_desc: Use image node_id 3 for calling the OptimizationAlgorithmBase obj's underlying member method code with example usage: obj.convertTrialsToResults(hyperparameterSpace, trials) and returns: results