code: def _process_pd_ice(
      exp: Explanation,
      pd_values: Optional[np.ndarray] = None,
      ice_values: Optional[np.ndarray] = None,
      n_ice: Union[Literal["all"], int, List[int]] = "all",
      center: bool = False,
  ) -> Tuple[Optional[np.ndarray], Optional[np.ndarray]]:
      """
      Process the `pd_values` and `ice_values` before plotting. Centers the plots if necessary and samples
      the `ice_values` for visualization purposes.
  
      Parameters
      ----------
      exp, n_ice, center
          See :py:meth:`alibi.explainers.partial_dependence.plot_pd` method.
      pd_values
          Array of ice_values of dimension `V` (i.e. `(V, )`), where V is the number of feature values where
          the PD is computed.
      ice_values
          Array of ice_values of dimension `V x N`, where `V` is the number of feature values where the PD is computed,
          and `N` is the number of instances in the reference dataset.
  
      Returns
      -------
      Tuple containing the processed `pd_values` and `ice_values`.
      """
      # pdp processing
      if exp.meta["params"]["kind"] == Kind.BOTH and center:
          pd_values = pd_values - pd_values[0]  # type: ignore[index]
  
      # ice processing
      if exp.meta["params"]["kind"] in [Kind.INDIVIDUAL, Kind.BOTH]:
          # sample ice values for visualization purposes
          ice_values = _sample_ice(ice_values=ice_values, n_ice=n_ice)  # type: ignore[arg-type]
  
          # center ice values if necessary
          if center:
              ice_values = ice_values - ice_values[0:1, :]
  
      return pd_values, ice_values
  
imports: import copy
  import logging
  import math
  import numbers
  import sys
  from abc import ABC, abstractmethod
  from enum import Enum
  from typing import Callable, Dict, Iterable, List, Optional, Tuple, Union, no_type_check
  import matplotlib.pyplot
  import numpy
  from scipy.stats.mstats import mquantiles
  from sklearn.base import BaseEstimator, is_classifier, is_regressor
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.ensemble._gb import BaseGradientBoosting
  from sklearn.ensemble._hist_gradient_boosting.gradient_boosting import BaseHistGradientBoosting
  from sklearn.tree import DecisionTreeRegressor
  from sklearn.utils.extmath import cartesian
  from sklearn.utils.validation import check_is_fitted
  from tqdm import tqdm
  from alibi.api.defaults import DEFAULT_DATA_PD, DEFAULT_META_PD
  from alibi.api.interfaces import Explainer, Explanation
  from alibi.explainers.ale import get_quantiles
  from alibi.utils import _get_options_string
label_desc: Use image node_id 3 for calling a global function with example usage: _process_pd_ice(exp, pd_values, ice_values, n_ice, center) and returns: pd_values,  ice_values