class_docstr: The PGExplainer model from the `"Parameterized Explainer for Graph
  Neural Network" <https://arxiv.org/abs/2011.04573>`_ paper.
  
  Internally, it utilizes a neural network to identify subgraph structures
  that play a crucial role in the predictions made by a GNN.
  Importantly, the :class:`PGExplainer` needs to be trained via
  :meth:`~PGExplainer.train` before being able to generate explanations:
  
  .. code-block:: python
  
      explainer = Explainer(
          model=model,
          algorithm=PGExplainer(epochs=30, lr=0.003),
          explanation_type='phenomenon',
          edge_mask_type='object',
          model_config=ModelConfig(...),
      )
  
      # Train against a variety of node-level or graph-level predictions:
      for epoch in range(30):
          for index in [...]:  # Indices to train against.
              loss = explainer.algorithm.train(epoch, model, x, edge_index,
                                               target=target, index=index)
  
      # Get the final explanations:
      explanation = explainer(x, edge_index, target=target, index=0)
  
  Args:
      epochs (int): The number of epochs to train.
      lr (float, optional): The learning rate to apply.
          (default: :obj:`0.003`).
      **kwargs (optional): Additional hyper-parameters to override default
          settings in
          :attr:`~torch_geometric.explain.algorithm.PGExplainer.coeffs`.
code: def _loss(
      self, y_hat: Tensor, y: Tensor, edge_mask: Tensor
  ) -> Tensor:
      if self.model_config.mode == ModelMode.binary_classification:
          loss = self._loss_binary_classification(y_hat, y)
      elif (
          self.model_config.mode == ModelMode.multiclass_classification
      ):
          loss = self._loss_multiclass_classification(y_hat, y)
      elif self.model_config.mode == ModelMode.regression:
          loss = self._loss_regression(y_hat, y)
  
      # Regularization loss:
      mask = edge_mask.sigmoid()
      size_loss = mask.sum() * self.coeffs["edge_size"]
      mask = 0.99 * mask + 0.005
      mask_ent = -mask * mask.log() - (1 - mask) * (1 - mask).log()
      mask_ent_loss = mask_ent.mean() * self.coeffs["edge_ent"]
  
      return loss + size_loss + mask_ent_loss
  
imports: import logging
  from typing import Optional, Union
  import torch
  from torch import Tensor
  from torch.nn import ReLU, Sequential
  from torch_geometric.explain import Explanation
  from torch_geometric.explain.algorithm import ExplainerAlgorithm
  from torch_geometric.explain.algorithm.utils import clear_masks, set_masks
  from torch_geometric.explain.config import ExplanationType, ModelMode, ModelTaskLevel
  from torch_geometric.nn import Linear
  from torch_geometric.nn.inits import reset
  from torch_geometric.utils import get_embeddings
label_desc: Use image node_id 9 for calling the PGExplainer obj's underlying member method code with example usage: obj._loss(y_hat, y, edge_mask) and returns: unknown