def get_world_size() -> int:
    """
    Get the number of processes in the distributed setting.

    Returns:
        int: The number of processes.
    """
    if is_distributed():
        return dist.get_world_size()
    else:
        return 1

    Get the number of processes in the distributed setting.

    Returns:
        int: The number of processes.
    
opensora/utils/logger.py