code: def __init__(
      self,
      obj_id,
      opt_values,
      arg_type=None,
      nb_samples=None,
      tunable=False,
      log_base=None,
  ):
      self.opt_values = opt_values
      self.obj_id = obj_id
      self.tunable = tunable
  
      # convert range to list of values
      if nb_samples:
          low, high = opt_values
  
          if log_base is None:
              # random search on uniform scale
              if arg_type is int:
                  self.opt_values = [
                      int(_)
                      for _ in np.random.choice(
                          np.arange(low, high),
                          nb_samples,
                          replace=False,
                      )
                  ]
              elif arg_type is float:
                  self.opt_values = np.random.uniform(
                      low, high, nb_samples
                  )
          else:
              # random search on log scale with specified base
              assert (
                  high >= low > 0
              ), "`opt_values` must be positive to do log-scale search."
  
              log_low, log_high = math.log(low, log_base), math.log(
                  high, log_base
              )
  
              self.opt_values = log_base ** np.random.uniform(
                  log_low, log_high, nb_samples
              )
  
imports: import argparse
  import json
  import math
  import os
  import random
  import re
  import traceback
  from argparse import ArgumentParser
  from copy import deepcopy
  from gettext import gettext
  from multiprocessing import Pool, Queue
  from time import sleep
  import numpy
  from .hyper_opt_utils import strategies
label_desc: Use image node_id 1 to create a new OptArg object from inherited base classes: object with example: obj = OptArg(obj_id, opt_values, arg_type, nb_samples, tunable, log_base)