class_docstr: Configuration class to store and validate high level explanation
  parameters.
  
  Args:
      explanation_type (ExplanationType or str): The type of explanation to
          compute. The possible values are:
  
              - :obj:`"model"`: Explains the model prediction.
  
              - :obj:`"phenomenon"`: Explains the phenomenon that the model
                is trying to predict.
  
          In practice, this means that the explanation algorithm will either
          compute their losses with respect to the model output
          (:obj:`"model"`) or the target output (:obj:`"phenomenon"`).
  
      node_mask_type (MaskType or str, optional): The type of mask to apply
          on nodes. The possible values are (default: :obj:`None`):
  
              - :obj:`None`: Will not apply any mask on nodes.
  
              - :obj:`"object"`: Will mask each node.
  
              - :obj:`"common_attributes"`: Will mask each feature.
  
              - :obj:`"attributes"`: Will mask each feature across all nodes.
  
      edge_mask_type (MaskType or str, optional): The type of mask to apply
          on edges. Has the sample possible values as :obj:`node_mask_type`.
          (default: :obj:`None`)
code: def __init__(
      self,
      explanation_type: Union[ExplanationType, str],
      node_mask_type: Optional[Union[MaskType, str]] = None,
      edge_mask_type: Optional[Union[MaskType, str]] = None,
  ):
      if node_mask_type is not None:
          node_mask_type = MaskType(node_mask_type)
      if edge_mask_type is not None:
          edge_mask_type = MaskType(edge_mask_type)
  
      if (
          edge_mask_type is not None
          and edge_mask_type != MaskType.object
      ):
          raise ValueError(
              f"'edge_mask_type' needs be None or of type "
              f"'object' (got '{edge_mask_type.value}')"
          )
  
      if node_mask_type is None and edge_mask_type is None:
          raise ValueError(
              "Either 'node_mask_type' or 'edge_mask_type' "
              "must be provided"
          )
  
      self.explanation_type = ExplanationType(explanation_type)
      self.node_mask_type = node_mask_type
      self.edge_mask_type = edge_mask_type
  
imports: from dataclasses import dataclass
  from enum import Enum
  from typing import Optional, Union
  from torch_geometric.utils.mixin import CastMixin
label_desc: Use image node_id 1 to create a new ExplainerConfig object from inherited base classes: CastMixin with example: obj = ExplainerConfig(explanation_type, node_mask_type, edge_mask_type)