code: def shared_tensor(shape, dtype=torch.float32):
      """Create a tensor in shared memory accessible by all processes within the same
      ``torch.distributed`` process group.
  
      The content is uninitialized.
  
      Parameters
      ----------
      shape : tuple[int]
          The shape of the tensor.
      dtype : torch.dtype, optional
          The dtype of the tensor.
  
      Returns
      -------
      Tensor
          The shared tensor.
      """
      return call_once_and_share(
          lambda: torch.empty(*shape, dtype=dtype), shape, dtype
      )
  
file_path: dgl/python/dgl/multiprocessing/pytorch.py
imports: import random
  import traceback
  from _thread import start_new_thread
  from functools import wraps
  import torch
  import torch.multiprocessing
  from ..utils import create_shared_mem_array, get_shared_mem_array
label_desc: Use image node_id 4 for calling a global function with example usage: shared_tensor(shape, dtype) and returns: call_once_and_share