docstr: Initialises background data if the user passes a `pandas.Series` object as input.
  Original object is returned as this is initialised internally by `shap` is there
  is no group structure specified. Otherwise, a `shap_utils.DenseData` object
  is initialised.
code: def _(
      self, background_data, *args, **kwargs
  ) -> Union[shap_utils.Data, pd.core.frame.Series]:
      """
      Initialises background data if the user passes a `pandas.Series` object as input.
      Original object is returned as this is initialised internally by `shap` is there
      is no group structure specified. Otherwise, a `shap_utils.DenseData` object
      is initialised.
      """
  
      _, groups, _ = args
      if self.use_groups:
          return shap_utils.DenseData(
              background_data.values.reshape(1, len(background_data)),
              list(background_data.index),
              groups,
          )
  
      return background_data
  
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 9 for calling the KernelShap obj's underlying member method code with example usage: obj._(background_data) and returns: background_data, shap_utils