code: def get_grid_points(
      array, n_grid_points=10, min_percentage=0, max_percentage=100
  ):
      """seperates a numerical array into a number of grid points. Helper function
      for get_pdp_df.
  
      Args:
          array (np.array): array
          n_grid_points (int, optional): number of points to divide array in.
              Defaults to 10.
          min_percentage (int, optional): Minimum percentage to start at,
              ignoring outliers. Defaults to 0.
          max_percentage (int, optional): Maximum percentage to reach, ignoring
              outliers. Defaults to 100.
  
      Raises:
          ValueError: [description]
  
      Returns:
          np.array
      """
  
      if isinstance(array, pd.Series):
          array = array.values
      else:
          array = np.array(array)
      if not is_numeric_dtype(array):
          raise ValueError("array should be a numeric dtype!")
  
      percentile_grids = np.linspace(
          start=min_percentage, stop=max_percentage, num=n_grid_points
      )
      value_grids = np.percentile(array, percentile_grids)
      return value_grids
  
imports: from functools import partial
  import re
  from collections import Counter
  from typing import List, Union
  import warnings
  import numpy
  import pandas
  from pandas.api.types import is_numeric_dtype, is_categorical_dtype
  from dtreeviz.trees import ShadowDecTree
  from sklearn.metrics import make_scorer
  from sklearn.base import clone
  from sklearn.pipeline import Pipeline
  from sklearn.model_selection import KFold, StratifiedKFold
  from joblib import Parallel, delayed
label_desc: Use image node_id 20 for calling a global function with example usage: get_grid_points(array, n_grid_points, min_percentage, max_percentage) and returns: value_grids