code: def dictionaries_values_to_lists(
      hyperparameter_dicts, hyperparameters_list_type=None
  ):
      """Calls `~greykite.common.utils.python_utils.dictionary_values_to_lists`
      on the provided dictionary or on each item in a list of dictionaries.
  
      ``dictionary_values_to_lists`` returns a copy whose values are
       either lists, distributions with a ``rvs`` method, or None.
  
      Parameters
      ----------
      hyperparameter_dicts : `dict` [`str`, `any`] or `list` [`dict` [`str`, `any`]]
          Dictionary of hyperparameters, or list of such dictionaries
  
      hyperparameters_list_type : `set` [`str`] or `dict` [`str`, `list`] or None, optional, default None
          Hyperparameters that must be a `list` or other recognized value.
          e.g. ``regressor_cols`` is `list` or None, ``holiday_lookup_countries`` is `list` or "auto"
          or None.
  
          Thus, a flat list must become nested. E.g. ["US", "UK"] must be converted to [["US", "UK"]].
  
          Specifically, the values in ``hyperparameter_dict`` must be of type
          `list` [`list` or other accepted value].
  
              * If a set, other accepted value = [None]
              * If a dict, other accepted value is specified by the key's value, a
                list of valid options.
  
                For example, to allow `list` or "auto" or None, use
                ``hyperparameters_list_type={"regressor_cols": [None, "auto"]}``.
  
                For example, ``hyperparameters_list_type={"regressor_cols": [None]}`` is equivalent to
                ``hyperparameters_list_type={"regressor_cols"}`` using the set specification.
  
      Returns
      -------
      hyperparameter_grid : `dict` [`str`, `list` [`any`], or distribution with ``rvs`` method] or `list` [`dict]
          A dictionary or list of dictionaries suitable to pass as
          ``param_distributions`` to `sklearn.model_selection.RandomizedSearchCV`
          for grid search.
  
          As explained in `sklearn.model_selection.RandomizedSearchCV`:
          Dictionary with parameters names (string) as keys and distributions
          or lists of parameters to try. Distributions must provide a ``rvs``
          method for sampling (such as those from scipy.stats.distributions).
          If a list is given, it is sampled uniformly.
  
      See Also
      --------
      `~greykite.common.utils.python_utils.dictionary_values_to_lists`
      """
      if isinstance(hyperparameter_dicts, (list, tuple)):
          hyperparameter_grids = [
              dictionary_values_to_lists(
                  item,
                  hyperparameters_list_type=hyperparameters_list_type,
              )
              for item in hyperparameter_dicts
          ]
      else:
          hyperparameter_grids = dictionary_values_to_lists(
              hyperparameter_dicts,
              hyperparameters_list_type=hyperparameters_list_type,
          )
      return hyperparameter_grids
  
imports: import copy
  import dataclasses
  import functools
  import math
  import re
  import warnings
  from dataclasses import field
  from typing import List
  import numpy
  import pandas
  from pandas.testing import assert_frame_equal
  from pandas.testing import assert_index_equal
  from pandas.testing import assert_series_equal
label_desc: Use image node_id 8 for calling a global function with example usage: dictionaries_values_to_lists(hyperparameter_dicts, hyperparameters_list_type) and returns: hyperparameter_grids