code: def dropout_node(
      edge_index: Tensor,
      p: float = 0.5,
      num_nodes: Optional[int] = None,
      training: bool = True,
      relabel_nodes: bool = False,
  ) -> Tuple[Tensor, Tensor, Tensor]:
      r"""Randomly drops nodes from the adjacency matrix
      :obj:`edge_index` with probability :obj:`p` using samples from
      a Bernoulli distribution.
  
      The method returns (1) the retained :obj:`edge_index`, (2) the edge mask
      indicating which edges were retained. (3) the node mask indicating
      which nodes were retained.
  
      Args:
          edge_index (LongTensor): The edge indices.
          p (float, optional): Dropout probability. (default: :obj:`0.5`)
          num_nodes (int, optional): The number of nodes, *i.e.*
              :obj:`max_val + 1` of :attr:`edge_index`. (default: :obj:`None`)
          training (bool, optional): If set to :obj:`False`, this operation is a
              no-op. (default: :obj:`True`)
          relabel_nodes (bool, optional): If set to `True`, the resulting
              `edge_index` will be relabeled to hold consecutive indices
              starting from zero.
  
      :rtype: (:class:`LongTensor`, :class:`BoolTensor`, :class:`BoolTensor`)
  
      Examples:
          >>> edge_index = torch.tensor([[0, 1, 1, 2, 2, 3],
          ...                            [1, 0, 2, 1, 3, 2]])
          >>> edge_index, edge_mask, node_mask = dropout_node(edge_index)
          >>> edge_index
          tensor([[0, 1],
                  [1, 0]])
          >>> edge_mask
          tensor([ True,  True, False, False, False, False])
          >>> node_mask
          tensor([ True,  True, False, False])
      """
      if p < 0.0 or p > 1.0:
          raise ValueError(
              f"Dropout probability has to be between 0 and 1 "
              f"(got {p}"
          )
  
      num_nodes = maybe_num_nodes(edge_index, num_nodes)
  
      if not training or p == 0.0:
          node_mask = edge_index.new_ones(num_nodes, dtype=torch.bool)
          edge_mask = edge_index.new_ones(
              edge_index.size(1), dtype=torch.bool
          )
          return edge_index, edge_mask, node_mask
  
      prob = torch.rand(num_nodes, device=edge_index.device)
      node_mask = prob > p
      edge_index, _, edge_mask = subgraph(
          node_mask,
          edge_index,
          relabel_nodes=relabel_nodes,
          num_nodes=num_nodes,
          return_edge_mask=True,
      )
      return edge_index, edge_mask, node_mask
  
file_path: pytorch_geometric/torch_geometric/utils/dropout.py
imports: from typing import Optional, Tuple
  import torch
  from torch import Tensor
  import torch_geometric.typing
  from torch_geometric import is_compiling
  from torch_geometric.deprecation import deprecated
  from torch_geometric.typing import OptTensor
  from torch_geometric.utils import cumsum, degree, sort_edge_index, subgraph
  from torch_geometric.utils.num_nodes import maybe_num_nodes
label_desc: Use image node_id 3 for calling a global function with example usage: dropout_node(edge_index, p, num_nodes, training, relabel_nodes) and returns: edge_index,  edge_mask,  node_mask, edge_index,  edge_mask,  node_mask