class_docstr: An abstract base class for implementing explainer algorithms.
code: def _loss_binary_classification(
      self, y_hat: Tensor, y: Tensor
  ) -> Tensor:
      if self.model_config.return_type == ModelReturnType.raw:
          loss_fn = F.binary_cross_entropy_with_logits
      elif self.model_config.return_type == ModelReturnType.probs:
          loss_fn = F.binary_cross_entropy
      else:
          assert False
  
      return loss_fn(y_hat.view_as(y), y.float())
  
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 10 for calling the ExplainerAlgorithm obj's underlying member method code with example usage: obj._loss_binary_classification(y_hat, y) and returns: loss_fn