class_docstr: Explanation Processor is edge mask explanation processor which can handle sparsity control and use
  data collector automatically.
  
  Args:
      model (torch.nn.Module): The target model prepared to explain.
      device (torch.device): Specify running device: CPU or CUDA.
docstr: Please refer to the main function in `metric.py`.
docstr_tok: ["Please","refer","to","the","main","function","in","`","metric.py","`","."]
code: def forward(
      self,
      data: Data,
      masks: List[torch.Tensor],
      x_collector: XCollector,
      **kwargs,
  ):
      r"""
      Please refer to the main function in `metric.py`.
      """
  
      data.to(self.device)
      node_idx = kwargs.get("node_idx")
      y_idx = 0 if node_idx is None else node_idx
  
      assert not torch.isnan(data.y[y_idx].squeeze())
  
      self.num_edges = data.edge_index.shape[1]
      self.num_nodes = data.x.shape[0]
  
      with torch.no_grad():
          with self.connect_mask(self):
              related_preds = self.eval_related_pred(
                  data.x, data.edge_index, masks, **kwargs
              )
  
      x_collector.collect_data(
          masks, related_preds, data.y[y_idx].squeeze().long().item()
      )
  
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 ExplanationProcessor obj's underlying member method code with example usage: obj.forward(data, masks, x_collector) without return types