docstr: This function warns the user if slow runtime can occur due to the background dataset.
  
  Parameters
  ----------
  background_data
      Background dataset.
code: def _check_inputs(
      background_data: Union[pd.DataFrame, np.ndarray]
  ) -> None:
      """
      This function warns the user if slow runtime can occur due to the background dataset.
  
      Parameters
      ----------
      background_data
          Background dataset.
      """
  
      if (
          background_data.shape[0]
          > TREE_SHAP_BACKGROUND_WARNING_THRESHOLD
      ):
          msg = (
              "Large datasets may cause slow runtimes for shap. The background dataset "
              "provided has {} records. If the runtime is too slow, consider passing a "
              "subset or allowing the algorithm to automatically summarize the data by "
              "setting the summarise_background=True or setting summarise_background to "
              "'auto' which will default to {} samples!"
          )
          logger.warning(
              msg.format(
                  background_data.shape[0],
                  TREE_SHAP_BACKGROUND_WARNING_THRESHOLD,
              )
          )
  
imports: import copy
  import logging
  from functools import partial
  from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
  import numpy
  import pandas
  import shap
  import shap.utils._legacy
  from scipy import sparse
  from scipy.special import expit
  from shap import KernelExplainer
  from alibi.api.defaults import DEFAULT_DATA_KERNEL_SHAP, DEFAULT_DATA_TREE_SHAP, DEFAULT_META_KERNEL_SHAP, DEFAULT_META_TREE_SHAP
  from alibi.api.interfaces import Explainer, Explanation, FitMixin
  from alibi.utils.wrappers import methdispatch
label_desc: Use image node_id 4 for calling the TreeShap obj's underlying member method code with example usage: obj._check_inputs(background_data) without return types