docstr: Initialises background data if the user passes a `shap_utils.Data` object as input.
  
  Notes
  _____
  If ``self.summarise_background=True``, then a `shap_utils.Data` object is
  returned if the user passed a `shap_utils.Data` object to `fit` or didn't specify groups.
code: def _(self, background_data, *args, **kwargs) -> shap_utils.Data:
      """
      Initialises background data if the user passes a `shap_utils.Data` object as input.
  
      Notes
      _____
      If ``self.summarise_background=True``, then a `shap_utils.Data` object is
      returned if the user passed a `shap_utils.Data` object to `fit` or didn't specify groups.
      """
  
      group_names, groups, weights = args
      if weights is not None and self.summarise_background:
          if not self.ignore_weights:
              background_data.weights = weights
          if self.use_groups:
              background_data.groups = groups
              background_data.group_names = group_names
              background_data.group_size = len(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 5 for calling the KernelShap obj's underlying member method code with example usage: obj._(background_data) and returns: background_data