class_docstr: ParamterTransform base class, creates correct object
  depending on parameter.
class_docstr_tok: ["ParamterTransform","base","class",",","creates","correct","object","depending","on","parameter","."]
code: def from_parameter(parameter):
      if isinstance(parameter, Choice) or isinstance(
          parameter, Ordinal
      ):
          return ChoiceTransform(parameter)
      elif isinstance(parameter, Continuous):
          if parameter.scale == "log":
              return LogContinuousTransform(parameter)
          else:
              return ContinuousTransform(parameter)
      elif isinstance(parameter, Discrete):
          if parameter.scale == "log":
              warnings.warn(
                  "GPyOpt discrete parameter does not "
                  "support log-scale.",
                  UserWarning,
              )
          return DiscreteTransform(parameter)
  
imports: import numpy
  import logging
  import sherpa
  from sherpa.algorithms import Algorithm
  import pandas
  from sherpa.core import Choice, Continuous, Discrete, Ordinal
  import collections
  import GPyOpt
  import GPy
  import warnings
label_desc: Use image node_id 2 for calling the ParameterTransform obj's underlying member method code with example usage: obj.from_parameter(parameter) and returns: ChoiceTransform, LogContinuousTransform, ContinuousTransform, DiscreteTransform