code: def contains_isolated_nodes(
      edge_index: Tensor,
      num_nodes: Optional[int] = None,
  ) -> bool:
      r"""Returns :obj:`True` if the graph given by :attr:`edge_index` contains
      isolated nodes.
  
      Args:
          edge_index (LongTensor): The edge indices.
          num_nodes (int, optional): The number of nodes, *i.e.*
              :obj:`max_val + 1` of :attr:`edge_index`. (default: :obj:`None`)
  
      :rtype: bool
  
      Examples:
          >>> edge_index = torch.tensor([[0, 1, 0],
          ...                            [1, 0, 0]])
          >>> contains_isolated_nodes(edge_index)
          False
  
          >>> contains_isolated_nodes(edge_index, num_nodes=3)
          True
      """
      num_nodes = maybe_num_nodes(edge_index, num_nodes)
      edge_index, _ = remove_self_loops(edge_index)
      return torch.unique(edge_index.view(-1)).numel() < num_nodes
  
imports: from typing import Optional, Tuple
  import torch
  from torch import Tensor
  from torch_geometric.utils import remove_self_loops, segregate_self_loops
  from torch_geometric.utils.num_nodes import maybe_num_nodes
label_desc: Use image node_id 1 for calling a global function with example usage: contains_isolated_nodes(edge_index, num_nodes) and returns: unknown