class_docstr: Wraps a PyTorch model (one that implements torch.nn.Module) so that model(x)
  produces SHAP values as well as predictions (controllable by 'shap_values'
  flag.
docstr: Arguments:
  x: PyTorch tensor to predict with, as in normal torch.nn.Module API
  shap_values:     Binary flag -- whether to produce SHAP values
  sparse_labels:  np.array of sparse integer labels, i.e. 0-9 for MNIST. Used if you only
      want to explain the prediction for the true class per sample.
  k: int - Number of references to use default for explanations. As low as 1 for training.
      100-200 for reliable explanations. 
docstr_tok: ["Arguments",":","x",":","PyTorch","tensor","to","predict","with",",","as","in","normal","torch.nn.Module","API","shap_values",":","Binary","flag","--","whether","to","produce","SHAP","values","sparse_labels",":","np.array","of","sparse","integer","labels",",","i.e",".","0-9","for","MNIST",".","Used","if","you","only","want","to","explain","the","prediction","for","the","true","class","per","sample",".","k",":","int","-","Number","of","references","to","use","default","for","explanations",".","As","low","as","1","for","training",".","100-200","for","reliable","explanations","."]
code: def forward(self, x, shap_values=False, sparse_labels=None, k=1):
      """
      Arguments:
      x: PyTorch tensor to predict with, as in normal torch.nn.Module API
      shap_values:     Binary flag -- whether to produce SHAP values
      sparse_labels:  np.array of sparse integer labels, i.e. 0-9 for MNIST. Used if you only
          want to explain the prediction for the true class per sample.
      k: int - Number of references to use default for explanations. As low as 1 for training.
          100-200 for reliable explanations.
      """
      output = self.base(x)
      if not shap_values:
          return output
      else:
          shaps = self.exp.shap_values(
              self.base, x, sparse_labels=sparse_labels, k=k
          )
      return output, shaps
  
imports: import functools
  import operator
  import torch
  from torch.autograd import grad
  from torch.utils.data import DataLoader
label_desc: Use image node_id 2 for calling the ExpectedGradientsModel obj's underlying member method code with example usage: obj.forward(x, shap_values, sparse_labels, k) and returns: output,  shaps, output