class_docstr: A `Captum <https://captum.ai>`__-based explainer for identifying compact
  subgraph structures and node features that play a crucial role in the
  predictions made by a GNN.
  
  This explainer algorithm uses :captum:`null` `Captum <https://captum.ai/>`_
  to compute attributions.
  
  Currently, the following attribution methods are supported:
  
  * :class:`captum.attr.IntegratedGradients`
  * :class:`captum.attr.Saliency`
  * :class:`captum.attr.InputXGradient`
  * :class:`captum.attr.Deconvolution`
  * :class:`captum.attr.ShapleyValueSampling`
  * :class:`captum.attr.GuidedBackprop`
  
  Args:
      attribution_method (Attribution or str): The Captum attribution method
          to use. Can be a string or a :class:`captum.attr` method.
      **kwargs: Additional arguments for the Captum attribution method.
class_docstr_tok: ["A","`","Captum","<","https",":","\/\/captum.ai",">","`","__-based","explainer","for","identifying","compact","subgraph","structures","and","node","features","that","play","a","crucial","role","in","the","predictions","made","by","a","GNN",".","This","explainer","algorithm","uses",":","captum",":","`","null","`","`","Captum","<","https",":","\/\/captum.ai\/",">","`","_","to","compute","attributions",".","Currently",",","the","following","attribution","methods","are","supported",":","*",":","class",":","`","captum.attr.IntegratedGradients","`","*",":","class",":","`","captum.attr.Saliency","`","*",":","class",":","`","captum.attr.InputXGradient","`","*",":","class",":","`","captum.attr.Deconvolution","`","*",":","class",":","`","captum.attr.ShapleyValueSampling","`","*",":","class",":","`","captum.attr.GuidedBackprop","`","Args",":","attribution_method","(","Attribution","or","str",")",":","The","Captum","attribution","method","to","use",".","Can","be","a","string","or","a",":","class",":","`","captum.attr","`","method",".","*","*","kwargs",":","Additional","arguments","for","the","Captum","attribution","method","."]
code: def supports(self) -> bool:
      node_mask_type = self.explainer_config.node_mask_type
      if node_mask_type not in [None, MaskType.attributes]:
          logging.error(
              f"'{self.__class__.__name__}' expects "
              f"'node_mask_type' to be 'None' or 'attributes' "
              f"(got '{node_mask_type.value}')"
          )
          return False
  
      return_type = self.model_config.return_type
      if (
          self.model_config.mode == ModelMode.binary_classification
          and return_type != ModelReturnType.probs
      ):
          logging.error(
              f"'{self.__class__.__name__}' expects "
              f"'return_type' to be 'probs' for binary "
              f"classification tasks (got '{return_type.value}')"
          )
          return False
  
      # TODO (ramona) Confirm that output type is valid.
      return True
  
file_path: pytorch_geometric/torch_geometric/explain/algorithm/captum_explainer.py
imports: import inspect
  import logging
  import warnings
  from typing import Any, Dict, Optional, Union
  import torch
  from torch import Tensor
  from torch_geometric.explain import Explanation, HeteroExplanation
  from torch_geometric.explain.algorithm import ExplainerAlgorithm
  from torch_geometric.explain.algorithm.captum import CaptumHeteroModel, CaptumModel, MaskLevelType, convert_captum_output, to_captum_input
  from torch_geometric.explain.config import MaskType, ModelMode, ModelReturnType
  from torch_geometric.typing import EdgeType, NodeType
label_desc: Use image node_id 7 for calling the CaptumExplainer obj's underlying member method code with example usage: obj.supports() and returns: True, False, False