class_docstr: An abstract base class for implementing explainer algorithms.
docstr: Connects an explainer and model configuration to the explainer
  algorithm.
docstr_tok: ["Connects","an","explainer","and","model","configuration","to","the","explainer","algorithm","."]
code: def connect(
      self,
      explainer_config: ExplainerConfig,
      model_config: ModelConfig,
  ):
      r"""Connects an explainer and model configuration to the explainer
      algorithm.
      """
      self._explainer_config = ExplainerConfig.cast(explainer_config)
      self._model_config = ModelConfig.cast(model_config)
  
      if not self.supports():
          raise ValueError(
              f"The explanation algorithm '{self.__class__.__name__}' does "
              f"not support the given explanation settings."
          )
  
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 5 for calling the ExplainerAlgorithm obj's underlying member method code with example usage: obj.connect(explainer_config, model_config) without return types