def get_data_parallel_rank():
    """Return my rank for the data parallel group."""
    return get_rank(get_data_parallel_group())
Return my rank for the data parallel group.
fairseq/distributed/utils.py