code: def _validate_params(param_sets):
      """Validates grid params"""
      invalid_params = [
          type(param)
          for param in param_sets
          if not isinstance(param, dict)
      ]
      if invalid_params:
          raise ValueError(
              "Params must be dictionaries: got "
              "{0!r}".format(invalid_params)
          )
  
imports: import numbers
  import numpy
  from itertools import compress
  from scipy.sparse import issparse
  from sklearn.model_selection import ParameterGrid
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 3 for calling a global function with example usage: _validate_params(param_sets) without return types