code: def test_wandb_logger_dirs_creation(wandb_mock, tmp_path):
      """Test that the logger creates the folders and files in the right place."""
      wandb_mock.run = None
      logger = WandbLogger(
          project="project", save_dir=tmp_path, offline=True
      )
  
      # mock return values of experiment
      wandb_mock.run = None
      logger.experiment.id = "1"
      logger.experiment.name = "run_name"
  
      for _ in range(2):
          _ = logger.experiment
  
      assert logger.version == "1"
      assert logger.name == "project"
      assert str(tmp_path) == logger.save_dir
      assert not os.listdir(tmp_path)
  
      version = logger.version
      model = BoringModel()
      trainer = Trainer(
          default_root_dir=tmp_path,
          logger=logger,
          max_epochs=1,
          limit_train_batches=3,
          limit_val_batches=3,
      )
      assert trainer.log_dir == logger.save_dir
      trainer.fit(model)
  
      assert trainer.checkpoint_callback.dirpath == str(
          tmp_path / "project" / version / "checkpoints"
      )
      assert set(os.listdir(trainer.checkpoint_callback.dirpath)) == {
          "epoch=0-step=3.ckpt"
      }
      assert trainer.log_dir == logger.save_dir
  
imports: import os
  import pickle
  from unittest import mock
  import pytest
  import yaml
  from lightning.pytorch import Trainer
  from lightning.pytorch.callbacks import ModelCheckpoint
  from lightning.pytorch.cli import LightningCLI
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers import WandbLogger
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning_utilities.test.warning import no_warning_call
label_desc: Use image node_id 5 for calling a global function with example usage: test_wandb_logger_dirs_creation(wandb_mock, tmp_path) without return types