class_docstr: An implementation of FlowX in
  `FlowX: Towards Explainable Graph Neural Networks via Message Flows <https://arxiv.org/abs/2206.12987>`_.
  Args:
      model (torch.nn.Module): The target model prepared to explain.
      epochs (int, optional): The training steps.
      lr (float, optional): The explainer training learning rate.
      explain_graph (bool, optional): Whether to explain graph classification model.
          (default: :obj:`False`)
  .. note::
          For node classification model, the :attr:`explain_graph` flag is False.
class_docstr_tok: ["An","implementation","of","FlowX","in","`","FlowX",":","Towards","Explainable","Graph","Neural","Networks","via","Message","Flows","<","https",":","\/\/arxiv.org\/abs\/2206.12987",">","`","_",".","Args",":","model","(","torch.nn.Module",")",":","The","target","model","prepared","to","explain",".","epochs","(","int",",","optional",")",":","The","training","steps",".","lr","(","float",",","optional",")",":","The","explainer","training","learning","rate",".","explain_graph","(","bool",",","optional",")",":","Whether","to","explain","graph","classification","model",".","(","default",":",":","obj",":","`","False","`",")","..","note",":",":","For","node","classification","model",",","the",":","attr",":","`","explain_graph","`","flag","is","False","."]
code: def __loss__(self, raw_preds, x_label):
      if self.explain_graph:
          loss = cross_entropy_with_logit(raw_preds, x_label)
      else:
          loss = cross_entropy_with_logit(
              raw_preds[self.node_idx].unsqueeze(0), x_label
          )
  
      if self.fidelity_plus:
          loss = -loss
  
      # Option 2: make it hard: higher std, and closer to Sparsity
      # loss = loss - 10 * torch.square(self.mask - 0.5).mean()
  
      # loss = loss + 1e-3 * torch.square(self.mask.sum() - self.mask.shape[0] * (1 - x_args.sparsity))
      # m = self.nec_suf_mask.sigmoid()
      # loss = loss + self.coeffs['edge_size'] * m.sum()
      # ent = -m * torch.log(m + EPS) - (1 - m) * torch.log(1 - m + EPS)
      # loss = loss + self.coeffs['edge_ent'] * ent.mean()
  
      return loss
  
file_path: DIG/dig/xgraph/method/flowx.py
imports: from itertools import combinations
  from typing import List, Tuple, Union, Dict
  import torch
  import torch.nn
  from torch import Tensor
  from torch.nn.functional import cross_entropy
  from torch_geometric.utils.loop import add_self_loops, remove_self_loops
  from .base_explainer import WalkBase
  from ..models.utils import subgraph, gumbel_softmax
label_desc: Use image node_id 3 for calling the FlowX obj's underlying member method code with example usage: obj.__loss__(raw_preds, x_label) and returns: loss