in torchrecipes/utils/distributed_utils.py [0:0]
def get_world_size() -> int: if torch.distributed.is_available() and torch.distributed.is_initialized(): return torch.distributed.get_world_size() return 1