code: def test_wandb_logger_init_before_spawn(wandb_mock):
      logger = WandbLogger()
      assert logger._experiment is None
      logger.__getstate__()
      assert logger._experiment is not 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 3 for calling a global function with example usage: test_wandb_logger_init_before_spawn(wandb_mock) without return types