code: def test_multiple_loggers(tmpdir):
      class CustomModel(BoringModel):
          def training_step(self, batch, batch_idx):
              loss = self.step(batch)
              self.log("train_loss", loss)
              return {"loss": loss}
  
      model = CustomModel()
      logger1 = CustomLogger()
      logger2 = CustomLogger()
  
      trainer = Trainer(
          max_steps=2,
          log_every_n_steps=1,
          logger=[logger1, logger2],
          default_root_dir=tmpdir,
      )
      trainer.fit(model)
      assert (
          trainer.state.finished
      ), f"Training failed with {trainer.state}"
  
      assert logger1.hparams_logged is None
      assert logger1.metrics_logged != {}
      assert logger1.finalized_status == "success"
  
      assert logger2.hparams_logged is None
      assert logger2.metrics_logged != {}
      assert logger2.finalized_status == "success"
  
imports: import pickle
  from argparse import Namespace
  from copy import deepcopy
  from typing import Any, Dict, Optional
  from unittest.mock import patch
  import numpy
  import pytest
  import torch
  from lightning.fabric.utilities.logger import _convert_params, _sanitize_params
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringDataModule, BoringModel
  from lightning.pytorch.loggers import Logger, TensorBoardLogger
  from lightning.pytorch.loggers.logger import DummyExperiment, DummyLogger
  from lightning.pytorch.loggers.utilities import _scan_checkpoints
  from lightning.pytorch.utilities.rank_zero import rank_zero_only
label_desc: Use image node_id 2 for calling a global function with example usage: test_multiple_loggers(tmpdir) and returns: dict