docstr: Restructure of hyperopt.fmin `run()`, `serial_evaluate()`.
docstr_tok: ["Restructure","of","hyperopt.fmin","`","run","(",")","`",",","`","serial_evaluate","(",")","`","."]
code: def get_param(self, **kwargs):
      """
      Restructure of hyperopt.fmin `run()`, `serial_evaluate()`.
      """
      new_ids = self.trials.new_trial_ids(
          1
      )  # only one config each time
      trial = self.algo(
          new_ids,
          self.domain,
          self.trials,
          self.rstate.randint(2**31 - 1),
      )[0]
  
      trial["state"] = base.JOB_STATE_RUNNING
      now = coarse_utcnow()
      trial["book_time"] = now
      trial["refresh_time"] = now
      spec = base.spec_from_misc(trial["misc"])
  
      self.trials.insert_trial_docs([trial])
      self.trials.refresh()
  
      for param in self.parameter_config:
          if param["type"] == "int":
              spec[param["name"]] = int(
                  spec[param["name"]] + param["range"][0]
              )
          if param["type"] == "choice":
              spec[param["name"]] = param["range"][spec[param["name"]]]
      spec["tid"] = trial["tid"]
      return spec
  
file_path: auptimizer/src/aup/Proposer/HyperoptProposer.py
imports: import importlib
  import logging
  import numpy
  from six.moves import input
  from .AbstractProposer import AbstractProposer
  from .hyperopt import hp, base
  from .hyperopt.utils import coarse_utcnow
  from ..utils import set_default_keyvalue, check_missing_key, get_from_options
label_desc: Use image node_id 3 for calling the HyperoptProposer obj's underlying member method code with example usage: obj.get_param() and returns: spec