code: def generate_param_args_list(param_grid):
      """An utils similar to sci-kit learn package to generate combinations of args based on spaces of parameters
      provided from users in a dictionary of list format.
  
  
      Parameters
      ----------
      param_grid: dict of list
      dictionary where key represents the arg and value represents the list of values proposed for the grid
  
      Returns
      -------
      list of dict
      the iterated products of all combinations of params generated based on the input param grid
      """
  
      # an internal function to mimic the ParameterGrid from scikit-learn
  
      def _yield_param_grid(param_grid):
          if not isinstance(param_grid, (Mapping, Iterable)):
              raise TypeError(
                  "Parameter grid is not a dict or a list ({!r})".format(
                      param_grid
                  )
              )
  
          if isinstance(param_grid, Mapping):
              # wrap dictionary in a singleton list to support either dict
              # or list of dicts
              param_grid = [param_grid]
  
          for p in param_grid:
              # Always sort the keys of a dictionary, for reproducibility
              items = sorted(p.items())
              if not items:
                  yield {}
              else:
                  keys, values = zip(*items)
                  for v in product(*values):
                      params = dict(zip(keys, v))
                      yield params
  
      return list(_yield_param_grid(param_grid))
  
file_path: orbit/orbit/utils/params_tuning.py
imports: import pandas
  import inspect
  from tqdm.auto import tqdm
  from itertools import product
  from collections.abc import Mapping, Iterable
  from ..diagnostics.metrics import smape
  from ..diagnostics.backtest import BackTester
  from ..exceptions import IllegalArgument
  from ..forecaster import MAPForecaster
  import logging
label_desc: Use image node_id 2 for calling a global function with example usage: generate_param_args_list(param_grid) and returns: list