class_docstr: XCollector is a data collector which takes processed related prediction probabilities to calculate Fidelity+
  and Fidelity-.
  
  Args:
      sparsity (float): The Sparsity is use to transform the soft mask to a hard one.
  
  .. note::
      For more examples, see `benchmarks/xgraph
      <https://github.com/divelab/DIG/tree/dig/benchmarks/xgraph>`_.
docstr: Clear class members.
docstr_tok: ["Clear","class","members","."]
code: def new(self):
      r"""
      Clear class members.
      """
      self.__related_preds, self.__targets = {
          "zero": [],
          "masked": [],
          "maskout": [],
          "origin": [],
          "sparsity": [],
          "accuracy": [],
          "stability": [],
      }, []
      self.masks: Union[List, List[List[Tensor]]] = []
      (
          self.__fidelity,
          self.__fidelity_inv,
          self.__accuracy,
          self.__stability,
      ) = (None, None, None, None)
  
imports: import torch
  import torch.nn
  from typing import List, Union
  from torch import Tensor
  import numpy
  from torch_geometric.data.data import Data
  from torch_geometric.nn import MessagePassing
label_desc: Use image node_id 3 for calling the XCollector obj's underlying member method code with example usage: obj.new() without return types