code: def check_add_self_loops(
      module: torch.nn.Module,
      edge_types: List[EdgeType],
  ) -> None:
      is_bipartite = any([key[0] != key[-1] for key in edge_types])
      if is_bipartite and getattr(module, "add_self_loops", False):
          raise ValueError(
              f"'add_self_loops' attribute set to 'True' on module '{module}' "
              f"for use with edge type(s) '{edge_types}'. This will lead to "
              f"incorrect message passing results."
          )
  
file_path: pytorch_geometric/torch_geometric/utils/hetero.py
imports: from typing import Dict, List, Optional, Set, Tuple, Union
  import torch
  from torch import Tensor
  from torch.nn import ParameterDict
  from torch_geometric.typing import Adj, EdgeType, NodeType, SparseTensor
  from torch_geometric.utils import is_sparse, to_edge_index
  from torch_geometric.utils.num_nodes import maybe_num_nodes_dict
label_desc: Use image node_id 3 for calling a global function with example usage: check_add_self_loops(module, edge_types) without return types