code: def get_machine_local_and_dist_rank():
      """
      Get the distributed and local rank of the current gpu.
      """
      local_rank = int(os.environ.get("LOCAL_RANK", 0))
      distributed_rank = int(os.environ.get("RANK", 0))
      return local_rank, distributed_rank
  
imports: import logging
  import os
  from vissl.config import AttrDict
label_desc: Use image node_id 4 for calling a global function with example usage: get_machine_local_and_dist_rank() and returns: local_rank,  distributed_rank