code: def _mp_ParameterGrid_getitem(self, ind):
      """Get the parameters that would be ``ind``th in iteration
  
      Parameters
      ----------
      ind : int
          The iteration index
  
      Returns
      -------
      params : dict of str to any
          Equal to list(self)[ind]
      """
      # This is used to make discrete sampling without replacement memory
      # efficient.
      ind = int(ind)
      for sub_grid in self.param_grid:
          # XXX: could memoize information used here
          if not sub_grid:
              if ind == 0:
                  return {}
              else:
                  ind -= 1
                  continue
  
          # Reverse so most frequent cycling parameter comes first
          keys, values_lists = zip(*sorted(sub_grid.items())[::-1])
          sizes = [len(v_list) for v_list in values_lists]
          total = int(np.product(sizes, dtype=np.uint64))
  
          if ind >= total:
              # Try the next grid
              ind -= total
          else:
              out = {}
              for key, v_list, n in zip(keys, values_lists, sizes):
                  ind, offset = divmod(int(ind), n)
                  out[key] = v_list[offset]
              return out
  
      raise IndexError("ParameterGrid index out of range")
  
file_path: pycaret/pycaret/internal/patches/sklearn.py
imports: from typing import Any, Callable
  from unittest.mock import patch
  import numpy
  from sklearn.model_selection._validation import _fit_and_score, _score
  from sklearn.utils import check_random_state
  from pycaret.internal.pipeline import pipeline_predict_inverse_only
label_desc: Use image node_id 2 for calling a global function with example usage: _mp_ParameterGrid_getitem(ind) and returns: out, dict