code: def test_wandb_logger_cli_integration(
      log_model, expected, wandb_mock, monkeypatch, tmp_path
  ):
      """Test that the WandbLogger can be used with the LightningCLI."""
      monkeypatch.chdir(tmp_path)
  
      class InspectParsedCLI(LightningCLI):
          def before_instantiate_classes(self):
              assert (
                  self.config.trainer.logger.init_args.log_model
                  == expected
              )
  
      # Create a config file with the log_model parameter set. This seems necessary to be able
      # to set the init_args parameter of the logger on the CLI later on.
      input_config = {
          "trainer": {
              "logger": {
                  "class_path": "lightning.pytorch.loggers.wandb.WandbLogger",
                  "init_args": {"log_model": log_model},
              },
          }
      }
      config_path = "config.yaml"
      with open(config_path, "w") as f:
          f.write(yaml.dump(input_config))
  
      # Test case 1: Set the log_model parameter only via the config file.
      with mock.patch("sys.argv", ["any.py", "--config", config_path]):
          InspectParsedCLI(
              BoringModel, run=False, save_config_callback=None
          )
  
      # Test case 2: Overwrite the log_model parameter via the command line.
      wandb_cli_arg = (
          f"--trainer.logger.init_args.log_model={log_model}"
      )
  
      with mock.patch(
          "sys.argv", ["any.py", "--config", config_path, wandb_cli_arg]
      ):
          InspectParsedCLI(
              BoringModel, run=False, save_config_callback=None
          )
  
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 11 for calling a global function with example usage: test_wandb_logger_cli_integration(log_model, expected, wandb_mock, monkeypatch, tmp_path) without return types