class_docstr: This class represents a hyperparameter.
class_docstr_tok: ["This","class","represents","a","hyperparameter","."]
code: def convertToStructuredValues(self, flatValues):
      if "anyOf" in self.config or "oneOf" in self.config:
          v = "anyOf" if "anyOf" in self.config else "oneOf"
          data = self.config[v]
  
          subParameterIndex = flatValues[self.name]
          subParam = Hyperparameter(
              data[subParameterIndex],
              self,
              self.root + "." + str(subParameterIndex),
          )
  
          structured = subParam.convertToStructuredValues(flatValues)
          structured["$index"] = subParameterIndex
  
          return structured
      elif "constant" in self.config:
          return flatValues[self.name]
      elif "enum" in self.config:
          return flatValues[self.name]
      elif self.config["type"] == "object":
          result = {}
          for key in self.config["properties"].keys():
              config = self.config["properties"][key]
  
              subStructuredValue = Hyperparameter(
                  config, self, self.root + "." + key
              ).convertToStructuredValues(flatValues)
  
              result[key] = subStructuredValue
  
              if self.name == "":
                  for key in flatValues.keys():
                      if key.startswith("$"):
                          result[key] = flatValues[key]
          return result
      elif self.config["type"] == "number":
          return flatValues[self.name]
  
imports: from hyperopt import hp
  from contextlib import contextmanager
  import re
  import functools
  import random
  import numpy
  import numpy.random
  import pkg_resources
  import tempfile
  import scipy.stats
  import os
  import math
  import hyperopt
  import datetime
  import json
  import copy
label_desc: Use image node_id 7 for calling the Hyperparameter obj's underlying member method code with example usage: obj.convertToStructuredValues(flatValues) and returns: structured, flatValues, flatValues, result, flatValues