code: def get_local_rank() -> int:
      """
      Returns:
          The rank of the current process within the local (per-machine) process group.
      """
      if not is_enabled():
          return 0
      assert 0 <= _LOCAL_RANK < _LOCAL_WORLD_SIZE
      return _LOCAL_RANK
  
imports: import os
  import random
  import re
  import socket
  from typing import Dict, List
  import torch
  import torch.distributed
label_desc: Use image node_id 4 for calling a global function with example usage: get_local_rank() and returns: _LOCAL_RANK, int