code: def normalize(x: torch.Tensor):
      x -= (
          x.min()
      )  # This operation -= may lead to mem leak without detach() before this assignment. (x = x - x.min() won't lead to such a problem.)
      if x.max() == 0:
          return torch.zeros(x.size(), device=x.device)
      x /= x.max()
      return x
  
file_path: DIG/dig/xgraph/models/utils.py
imports: import torch
  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: normalize(x) and returns: x, torch