class_docstr: Lime is an interpretability method that trains an interpretable surrogate model
  by sampling points around a specified input example and using model evaluations
  at these points to train a simpler interpretable 'surrogate' model, such as a
  linear model.
  
  Lime provides a more specific implementation than LimeBase in order to expose
  a consistent API with other perturbation-based algorithms. For more general
  use of the LIME framework, consider using the LimeBase class directly and
  defining custom sampling and transformation to / from interpretable
  representation functions.
  
  Lime assumes that the interpretable representation is a binary vector,
  corresponding to some elements in the input being set to their baseline value
  if the corresponding binary interpretable feature value is 0 or being set
  to the original input value if the corresponding binary interpretable
  feature value is 1. Input values can be grouped to correspond to the same
  binary interpretable feature using a feature mask provided when calling
  attribute, similar to other perturbation-based attribution methods.
  
  One example of this setting is when applying Lime to an image classifier.
  Pixels in an image can be grouped into super-pixels or segments, which
  correspond to interpretable features, provided as a feature_mask when
  calling attribute. Sampled binary vectors convey whether a super-pixel
  is on (retains the original input values) or off (set to the corresponding
  baseline value, e.g. black image). An interpretable linear model is trained
  with input being the binary vectors and outputs as the corresponding scores
  of the image classifier with the appropriate super-pixels masked based on the
  binary vector. Coefficients of the trained surrogate
  linear model convey the importance of each super-pixel.
  
  More details regarding LIME can be found in the original paper:
  https://arxiv.org/abs/1602.04938
code: def _convert_output_shape(
      self,
      formatted_inp: Tuple[Tensor, ...],
      feature_mask: Tuple[Tensor, ...],
      coefs: Tensor,
      num_interp_features: int,
      is_inputs_tuple: Literal[False],
  ) -> Tensor:
      ...
  
imports: import inspect
  import math
  import typing
  import warnings
  from typing import Any, Callable, cast, List, Optional, Tuple, Union
  import torch
  from captum._utils.common import _expand_additional_forward_args, _expand_target, _flatten_tensor_or_tuple, _format_output, _format_tensor_into_tuples, _get_max_feature_index, _is_tuple, _reduce_list, _run_forward
  from captum._utils.models.linear_model import SkLearnLasso
  from captum._utils.models.model import Model
  from captum._utils.progress import progress
  from captum._utils.typing import BaselineType, Literal, TargetType, TensorOrTupleOfTensorsGeneric
  from captum.attr._utils.attribution import PerturbationAttribution
  from captum.attr._utils.batching import _batch_example_iterator
  from captum.attr._utils.common import _construct_default_feature_mask, _format_input_baseline
  from captum.log import log_usage
  from torch import Tensor
  from torch.nn import CosineSimilarity
  from torch.utils.data import DataLoader, TensorDataset
label_desc: Use image node_id 5 for calling the Lime obj's underlying member method code with example usage: obj._convert_output_shape(formatted_inp, feature_mask, coefs, num_interp_features, is_inputs_tuple) without return types