def test_version(tmp_path):
    """Verify versions of loggers are concatenated properly."""
    logger1 = CSVLogger(tmp_path, version=0)
    logger2 = CSVLogger(tmp_path, version=2)
    logger3 = CSVLogger(tmp_path, version=1)
    logger4 = CSVLogger(tmp_path, version=0)
    loggers = [logger1, logger2, logger3, logger4]
    version = _version([])
    assert version == ""
    version = _version([logger3])
    assert version == 1
    version = _version(loggers)
    assert version == "0_2_1"
    version = _version(loggers, "-")
    assert version == "0-2-1"
Verify versions of loggers are concatenated properly.
tests/tests_pytorch/loggers/test_utilities.py