code: def _calc_ice_lines(
      self,
      df,
      feats,
      grids,
      grid_idx,
  ):
      df[feats] = grids
      if self.data_transformer is not None:
          df = self.data_transformer(df)
      preds = _calc_preds(
          self.model,
          df,
          self.pred_func,
          self.from_model,
          self.predict_kwds,
          self.chunk_size,
      )
  
      if self.n_classes == 0:
          grid_results = pd.DataFrame(preds, columns=[grid_idx])
      elif self.n_classes == 2:
          grid_results = pd.DataFrame(preds[:, 1], columns=[grid_idx])
      else:
          grid_results = []
          for n_class in range(self.n_classes):
              grid_result = pd.DataFrame(
                  preds[:, n_class], columns=[grid_idx]
              )
              grid_results.append(grid_result)
  
      return grid_results
  
imports: from .pdp_utils import PDPIsolatePlotEngine, PDPInteractPlotEngine
  from .utils import _check_frac_to_plot, _make_list, _check_classes, _calc_n_jobs, FeatureInfo, _check_model, _calc_preds, _expand_params_for_interact, _check_dataset, _check_cluster_params, _check_plot_engine, _check_pdp_interact_plot_type
  import pandas
  import numpy
  from pqdm.processes import pqdm
  from tqdm.auto import tqdm
  import warnings
label_desc: Use image node_id 3 for calling the _PDPBase obj's underlying member method code with example usage: obj._calc_ice_lines(df, feats, grids, grid_idx) and returns: grid_results