class_docstr: An explainer that uses the attention coefficients produced by an
  attention-based GNN (*e.g.*,
  :class:`~torch_geometric.nn.conv.GATConv`,
  :class:`~torch_geometric.nn.conv.GATv2Conv`, or
  :class:`~torch_geometric.nn.conv.TransformerConv`) as edge explanation.
  Attention scores across layers and heads will be aggregated according to
  the :obj:`reduce` argument.
  
  Args:
      reduce (str, optional): The method to reduce the attention scores
          across layers and heads. (default: :obj:`"max"`)
class_docstr_tok: ["An","explainer","that","uses","the","attention","coefficients","produced","by","an","attention-based","GNN","(","*","e.g",".","*",",",":","class",":","`","~torch_geometric.nn.conv.GATConv","`",",",":","class",":","`","~torch_geometric.nn.conv.GATv2Conv","`",",","or",":","class",":","`","~torch_geometric.nn.conv.TransformerConv","`",")","as","edge","explanation",".","Attention","scores","across","layers","and","heads","will","be","aggregated","according","to","the",":","obj",":","`","reduce","`","argument",".","Args",":","reduce","(","str",",","optional",")",":","The","method","to","reduce","the","attention","scores","across","layers","and","heads",".","(","default",":",":","obj",":","`","``","max","''","`",")"]
code: def supports(self) -> bool:
      explanation_type = self.explainer_config.explanation_type
      if explanation_type != ExplanationType.model:
          logging.error(
              f"'{self.__class__.__name__}' only supports "
              f"model explanations "
              f"got (`explanation_type={explanation_type.value}`)"
          )
          return False
  
      node_mask_type = self.explainer_config.node_mask_type
      if node_mask_type is not None:
          logging.error(
              f"'{self.__class__.__name__}' does not support "
              f"explaining input node features "
              f"got (`node_mask_type={node_mask_type.value}`)"
          )
          return False
  
      return True
  
file_path: pytorch_geometric/torch_geometric/explain/algorithm/attention_explainer.py
imports: import logging
  from typing import List, Optional, Union
  import torch
  from torch import Tensor
  from torch_geometric.explain import Explanation
  from torch_geometric.explain.algorithm import ExplainerAlgorithm
  from torch_geometric.explain.config import ExplanationType, ModelTaskLevel
  from torch_geometric.nn.conv.message_passing import MessagePassing
label_desc: Use image node_id 3 for calling the AttentionExplainer obj's underlying member method code with example usage: obj.supports() and returns: True, False, False