code: def _scalars_into_lists(param_grid):
      """
      For a param_grid with scalars (instead of lists or callables), transform scalars into lists of size one.
  
      Parameters
      ----------
      param_grid: dict
          Parameter configurations.
          Example::
              param_grid = {"k": [50, 100], "eta": lambda: np.random.choice([1, 2, 3]}
      """
      for k, v in param_grid.items():
          if not (callable(v) or isinstance(v, Iterable)) or isinstance(
              v, str
          ):
              param_grid[k] = [v]
          elif isinstance(v, dict):
              _scalars_into_lists(v)
  
imports: import logging
  from collections.abc import Iterable
  from itertools import islice, product
  import numpy
  import pandas
  from tqdm import tqdm
  from ..evaluation import hits_at_n_score, mr_score, mrr_score
label_desc: Use image node_id 9 for calling a global function with example usage: _scalars_into_lists(param_grid) without return types