def get_global_rank():
    """Get the global rank

    The rank can globally identify the client process. For the client processes
    of the same role, their ranks are in a contiguous range.
    """
    if IS_STANDALONE:
        return 0
    else:
        return GLOBAL_RANK[rpc.get_rank()]
Get the global rank

    The rank can globally identify the client process. For the client processes
    of the same role, their ranks are in a contiguous range.
    
python/dgl/distributed/role.py