class_docstr: Holds all the obtained explanations of a homogeneous graph.
  
  The explanation object is a :obj:`~torch_geometric.data.Data` object and
  can hold node attributions and edge attributions.
  It can also hold the original graph if needed.
  
  Args:
      node_mask (Tensor, optional): Node-level mask with shape
          :obj:`[num_nodes, 1]`, :obj:`[1, num_features]` or
          :obj:`[num_nodes, num_features]`. (default: :obj:`None`)
      edge_mask (Tensor, optional): Edge-level mask with shape
          :obj:`[num_edges]`. (default: :obj:`None`)
      **kwargs (optional): Additional attributes.
docstr: Returns the induced subgraph, in which all nodes and edges with
  zero attribution are masked out.
docstr_tok: ["Returns","the","induced","subgraph",",","in","which","all","nodes","and","edges","with","zero","attribution","are","masked","out","."]
code: def get_explanation_subgraph(self) -> "Explanation":
      r"""Returns the induced subgraph, in which all nodes and edges with
      zero attribution are masked out.
      """
      node_mask = self.get("node_mask")
      if node_mask is not None:
          node_mask = node_mask.sum(dim=-1) > 0
      edge_mask = self.get("edge_mask")
      if edge_mask is not None:
          edge_mask = edge_mask > 0
      return self._apply_masks(node_mask, edge_mask)
  
imports: import copy
  from typing import Dict, List, Optional, Union
  import torch
  from torch import Tensor
  from torch_geometric.data.data import Data, warn_or_raise
  from torch_geometric.data.hetero_data import HeteroData
  from torch_geometric.explain.config import ThresholdConfig, ThresholdType
  from torch_geometric.typing import EdgeType, NodeType
  from torch_geometric.visualization import visualize_graph
label_desc: Use image node_id 2 for calling the Explanation obj's underlying member method code with example usage: obj.get_explanation_subgraph() and returns: self