code: def test_automatic_versioning_relative_root_dir(
      tmp_path, monkeypatch
  ):
      """Verify that automatic versioning works, when root_dir is given a relative path."""
      (tmp_path / "exp" / "logs" / "version_0").mkdir(parents=True)
      (tmp_path / "exp" / "logs" / "version_1").mkdir()
      monkeypatch.chdir(tmp_path)
      logger = CSVLogger(root_dir="exp", name="logs")
      assert logger.version == 2
  
file_path: pytorch-lightning/tests/tests_fabric/loggers/test_csv.py
imports: import os
  from unittest.mock import MagicMock
  import pytest
  import torch
  from lightning.fabric.loggers import CSVLogger
  from lightning.fabric.loggers.csv_logs import _ExperimentWriter
label_desc: Use image node_id 2 for calling a global function with example usage: test_automatic_versioning_relative_root_dir(tmp_path, monkeypatch) without return types