docstr: Features sanity checks.
  
  Parameters
  ----------
  features
      List of feature indices or tuples of feature indices to compute the partial dependence for.
docstr_tok: ["Features","sanity","checks",".","Parameters","--","--","--","--","--","features","List","of","feature","indices","or","tuples","of","feature","indices","to","compute","the","partial","dependence","for","."]
code: def _features_sanity_checks(
      self, features: Optional[List[Union[int, Tuple[int, int]]]]
  ) -> None:
      """
      Features sanity checks.
  
      Parameters
      ----------
      features
          List of feature indices or tuples of feature indices to compute the partial dependence for.
      """
      if features is None:
          return
  
      def check_feature(f):
          if not isinstance(f, numbers.Integral):
              raise ValueError(
                  f"All feature entries must be integers. Got a feature value of {type(f)} type."
              )
          if f >= len(self.feature_names):
              raise ValueError(
                  f"All feature entries must be less than "
                  f"``len(feature_names)={len(self.feature_names)}``. Got a feature value of {f}."
              )
          if f < 0:
              raise ValueError(
                  f"All feature entries must be greater or equal to 0. Got a feature value of {f}."
              )
  
      for feats in features:
          if not isinstance(feats, tuple):
              feats = (feats,)  # type: ignore[assignment]
  
          for f in feats:  # type: ignore[union-attr]
              check_feature(f)
  
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 4 for calling the PartialDependenceBase obj's underlying member method code with example usage: obj._features_sanity_checks(features) without return types