code: def test_log_dir_custom_logger(tmp_path):
      """Tests that the path is correct even when there is a custom logger."""
      expected = str(tmp_path / "custom_logs" / "version_0")
      model = TestModel(expected)
  
      trainer = Trainer(
          default_root_dir=tmp_path,
          max_steps=2,
          callbacks=[ModelCheckpoint(dirpath=tmp_path)],
          logger=TensorBoardLogger(
              save_dir=tmp_path, name="custom_logs"
          ),
      )
  
      assert trainer.log_dir == expected
      trainer.fit(model)
      assert trainer.log_dir == expected
  
file_path: pytorch-lightning/tests/tests_pytorch/trainer/properties/test_log_dir.py
imports: import pytest
  from lightning.pytorch import Trainer
  from lightning.pytorch.callbacks import ModelCheckpoint
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers import CSVLogger, TensorBoardLogger
label_desc: Use image node_id 6 for calling a global function with example usage: test_log_dir_custom_logger(tmp_path) without return types