code: def _convert_hyperparam_dict_to_filename(
      hyper_params: Dict[str, Any]
  ) -> str:
      """Helper function that converts a dictionary of hyperparameters to a string that can be a filename.
  
      Parameters
      ----------
      hyper_params: Dict
          Maps string of hyperparameter name to int/float/string/list etc.
  
      Returns
      -------
      filename: str
          A filename of form "_key1_value1_value2_..._key2..."
      """
      filename = ""
      keys = sorted(hyper_params.keys())
      for key in keys:
          filename += "_%s" % str(key)
          value = hyper_params[key]
          if isinstance(value, int):
              filename += "_%s" % str(value)
          elif isinstance(value, float):
              filename += "_%f" % value
          else:
              filename += "%s" % str(value)
      return filename
  
file_path: deepchem/deepchem/hyper/base_classes.py
imports: import logging
  from typing import Any, Callable, Dict, List, Optional, Tuple
  from deepchem.data import Dataset
  from deepchem.trans import Transformer
  from deepchem.models import Model
  from deepchem.metrics import Metric
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_hyperparam_dict_to_filename(hyper_params) and returns: filename