def get_local_size(local_process_group):
    """Gets the number of processes per-machine in the local process group.

    Args:
        local_process_group: the local process group

    Returns:
        the number of processes per-machine
    """
    if not dist.is_available():
        return 1

    if not dist.is_initialized():
        return 1

    return dist.get_world_size(group=local_process_group)
Gets the number of processes per-machine in the local process group.

    Args:
        local_process_group: the local process group

    Returns:
        the number of processes per-machine
    
fiftyone/utils/torch.py