class_docstr: An abstract base class for implementing explainer algorithms.
code: def _loss_multiclass_classification(
      self,
      y_hat: Tensor,
      y: Tensor,
  ) -> Tensor:
      if self.model_config.return_type == ModelReturnType.raw:
          loss_fn = F.cross_entropy
      elif self.model_config.return_type == ModelReturnType.probs:
          loss_fn = F.nll_loss
          y_hat = y_hat.log()
      elif self.model_config.return_type == ModelReturnType.log_probs:
          loss_fn = F.nll_loss
      else:
          assert False
  
      return loss_fn(y_hat, y)
  
imports: from abc import abstractmethod
  from typing import Dict, Optional, Tuple, Union
  import torch
  import torch.nn.functional
  from torch import Tensor
  from torch_geometric.explain import Explanation, HeteroExplanation
  from torch_geometric.explain.config import ExplainerConfig, ModelConfig, ModelReturnType
  from torch_geometric.nn import MessagePassing
  from torch_geometric.typing import EdgeType, NodeType
  from torch_geometric.utils import k_hop_subgraph
label_desc: Use image node_id 11 for calling the ExplainerAlgorithm obj's underlying member method code with example usage: obj._loss_multiclass_classification(y_hat, y) and returns: loss_fn