code: def grid_report(results, n_top=3):
      r"""Report the top grid search scores.
  
      Parameters
      ----------
      results : dict of numpy arrays
          Mean test scores for each grid search iteration.
      n_top : int, optional
          The number of grid search results to report.
  
      Returns
      -------
      None : None
  
      """
      for i in range(1, n_top + 1):
          candidates = np.flatnonzero(results["rank_test_score"] == i)
          for candidate in candidates:
              logger.info("Model with rank: {0}".format(i))
              logger.info(
                  "Mean validation score: {0:.3f} (std: {1:.3f})".format(
                      results["mean_test_score"][candidate],
                      results["std_test_score"][candidate],
                  )
              )
              logger.info(
                  "Parameters: {0}".format(results["params"][candidate])
              )
  
file_path: AlphaPy/alphapy/optimize.py
imports: from alphapy.globals import ModelType
  from datetime import datetime
  import itertools
  import logging
  import numpy
  from sklearn.feature_selection import RFECV
  from sklearn.feature_selection import SelectPercentile
  from sklearn.model_selection import GridSearchCV
  from sklearn.model_selection import RandomizedSearchCV
  from sklearn.pipeline import Pipeline
  from time import time
label_desc: Use image node_id 2 for calling a global function with example usage: grid_report(results, n_top) without return types