code: def test_wandb_logger_offline_log_model(wandb_mock, tmp_path):
      """Test that log_model=True raises an error in offline mode."""
      with pytest.raises(
          MisconfigurationException,
          match="checkpoints cannot be uploaded in offline mode",
      ):
          _ = WandbLogger(
              save_dir=tmp_path, offline=True, log_model=True
          )
  
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 9 for calling a global function with example usage: test_wandb_logger_offline_log_model(wandb_mock, tmp_path) without return types