code: def compute_parameter_range(
      params_dict: Dict, search_range: Union[int, float, Dict]
  ) -> Dict[str, Tuple[str, List[float]]]:
      """Convenience Function to compute parameter search space.
  
      Parameters
      ----------
      params_dict: Dict
          Dictionary mapping strings to Ints/Floats. An explicit list of
          parameters is computed with `search_range`. The optimization range
          computed is specified in the documentation for `search_range`
          below.
      search_range: int/float/Dict (default 4)
          The `search_range` specifies the range of parameter values to
          search for. If `search_range` is an int/float, it is used as the
          global search range for parameters. This creates a search
          problem on the following space:
  
          optimization on [initial value / search_range,
                          initial value * search_range]
  
          If `search_range` is a dict, it must contain the same keys as
          for `params_dict`. In this case, `search_range` specifies a
          per-parameter search range. This is useful in case some
          parameters have a larger natural range than others. For a given
          hyperparameter `hp` this would create the following search
          range:
  
          optimization on hp on [initial value[hp] / search_range[hp],
                                initial value[hp] * search_range[hp]]
  
      Returns
      -------
      param_range: Dict
          Dictionary mapping hyperparameter names to tuples. Each tuple is
          of form `(value_type, value_range)` where `value_type` is a string
          that is either "int" or "cont" and `value_range` is a list of two
          elements of the form `[low, hi]`. This format is expected by
          pyGPGO which `GaussianProcessHyperparamOpt` uses to perform
          optimization.
      """
      # Range of optimization
      param_range = {}
      if isinstance(search_range, dict):
          if sorted(params_dict.keys()) != sorted(search_range.keys()):
              raise ValueError(
                  "If search_range is provided as a dictionary, it must have the same keys as params_dict."
              )
      elif (not isinstance(search_range, int)) and (
          not isinstance(search_range, float)
      ):
          raise ValueError(
              "search_range must be a dict or int or float."
          )
      for hp, value in params_dict.items():
          if isinstance(search_range, dict):
              hp_search_range = search_range[hp]
          else:
              # We know from guard above that this is an int/float
              hp_search_range = search_range
          if isinstance(value, int):
              value_range = [
                  value // hp_search_range,
                  value * hp_search_range,
              ]
              param_range[hp] = ("int", value_range)
          elif isinstance(value, float):
              value_range = [
                  value / hp_search_range,
                  value * hp_search_range,
              ]
              param_range[hp] = ("cont", value_range)
      return param_range
  
file_path: deepchem/deepchem/hyper/gaussian_process.py
imports: import os
  import logging
  import tempfile
  from typing import Dict, List, Optional, Tuple, Union, Any, Callable
  from deepchem.data import Dataset
  from deepchem.trans import Transformer
  from deepchem.models import Model
  from deepchem.metrics import Metric
  from deepchem.hyper.base_classes import HyperparamOpt
  from deepchem.hyper.base_classes import _convert_hyperparam_dict_to_filename
label_desc: Use image node_id 1 for calling a global function with example usage: compute_parameter_range(params_dict, search_range) and returns: param_range