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","."]
docstr: Based on the explainer config, return the mask type.
docstr_tok: ["Based","on","the","explainer","config",",","return","the","mask","type","."]
code: def _get_mask_type(self) -> MaskLevelType:
      r"""Based on the explainer config, return the mask type."""
      node_mask_type = self.explainer_config.node_mask_type
      edge_mask_type = self.explainer_config.edge_mask_type
      if node_mask_type is not None and edge_mask_type is not None:
          mask_type = MaskLevelType.node_and_edge
      elif node_mask_type is not None:
          mask_type = MaskLevelType.node
      elif edge_mask_type is not None:
          mask_type = MaskLevelType.edge
      else:
          raise ValueError(
              "Neither node mask type nor "
              "edge mask type is specified."
          )
      return mask_type
  
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 2 for calling the CaptumExplainer obj's underlying member method code with example usage: obj._get_mask_type() and returns: mask_type