code: def set_nccl_socket_envs():
      if os.getenv("NCCL_SOCKET_IFNAME") is None:
          raise RuntimeError("NCCL_SOCKET_IFNAME was not set")
      os.environ["NCCL_NET"] = "Socket"
  
imports: from typing import Tuple, Optional
  import warnings
  import os
  import torch
  from apex.transformer.log_util import get_transformer_logger
  from apex.transformer._ucc_util import HAS_UCC
label_desc: Use image node_id 2 for calling a global function with example usage: set_nccl_socket_envs() without return types