code: def is_master(opts) -> bool:
      node_rank = getattr(opts, "ddp.rank", 0)
      return node_rank == 0
  
file_path: ml-cvnets/utils/ddp_utils.py
imports: import socket
  from typing import Optional
  import torch
  import torch.distributed
  from utils import logger
label_desc: Use image node_id 1 for calling a global function with example usage: is_master(opts) and returns: unknown