code: def test_fabric_logger_access():
      """Test that the logger attribute can be accessed when the LightningModule is used together with Fabric."""
      # No logger
      module = BoringModel()
      fabric = Fabric()
      wrapped_module = fabric.setup(module)
      assert wrapped_module.loggers == []
      with pytest.raises(IndexError):
          _ = wrapped_module.logger
  
      # Single Logger
      logger = Mock()
      module = BoringModel()
      fabric = Fabric(loggers=logger)
      wrapped_module = fabric.setup(module)
      assert wrapped_module.logger == logger
      assert wrapped_module.loggers == [logger]
  
      # Multiple loggers
      logger1 = Mock()
      logger2 = Mock()
      module = BoringModel()
      fabric = Fabric(loggers=[logger1, logger2])
      wrapped_module = fabric.setup(module)
      assert wrapped_module.logger == logger1
      assert wrapped_module.loggers == [logger1, logger2]
  
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 20 for calling a global function with example usage: test_fabric_logger_access() without return types