code: def test_property_loggers(tmpdir):
      """Test that loggers in LightningModule is accessible via the Trainer."""
      model = BoringModel()
      assert model.loggers == []
  
      logger = TensorBoardLogger(tmpdir)
      trainer = Trainer(logger=logger)
      model.trainer = trainer
      assert model.loggers == [logger]
  
      logger0 = TensorBoardLogger(tmpdir)
      logger1 = TensorBoardLogger(tmpdir)
      trainer = Trainer(logger=[logger0, logger1])
      model.trainer = trainer
      assert model.loggers == [logger0, logger1]
  
imports: import sys
  import weakref
  from unittest.mock import Mock
  import pytest
  import torch
  from lightning.fabric import Fabric
  from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_1_13, _TORCH_GREATER_EQUAL_2_0
  from lightning.pytorch import LightningModule, Trainer
  from lightning.pytorch.core.module import _TrainerFabricShim
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers import TensorBoardLogger
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from torch import nn
  from torch.optim import SGD, Adam
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 7 for calling a global function with example usage: test_property_loggers(tmpdir) without return types