def test_logger_initialization(tmp_path, monkeypatch, logger_class):
    """Test that loggers get replaced by dummy loggers on global rank > 0 and that the experiment object is available
    at the right time in Trainer."""
    _patch_comet_atexit(monkeypatch)
    try:
        _test_logger_initialization(tmp_path, logger_class)
    except (ImportError, ModuleNotFoundError):
        pytest.xfail(f"multi-process test requires {logger_class.__class__} dependencies to be installed.")
Test that loggers get replaced by dummy loggers on global rank > 0 and that the experiment object is available
    at the right time in Trainer.
tests/tests_pytorch/loggers/test_all.py