code: def test_multi_dataloaders_add_suffix_properly(tmpdir, suffix):
      class TestModel(BoringModel):
          def test_step(self, batch, batch_idx, dataloader_idx=0):
              out = super().test_step(batch, batch_idx)
              self.log(
                  "test_loss", out["y"], on_step=True, on_epoch=True
              )
              return out
  
          def test_dataloader(self):
              if suffix:
                  return [
                      torch.utils.data.DataLoader(
                          RandomDataset(32, 64)
                      ),
                      torch.utils.data.DataLoader(
                          RandomDataset(32, 64)
                      ),
                  ]
              return super().test_dataloader()
  
      model = TestModel()
  
      trainer = Trainer(
          default_root_dir=tmpdir,
          limit_train_batches=0,
          limit_val_batches=0,
          limit_test_batches=2,
          max_epochs=1,
          log_every_n_steps=1,
          enable_model_summary=False,
      )
      results = trainer.test(model)
  
      for i, r in enumerate(results):
          expected = {"test_loss_epoch"}
          if suffix:
              expected = {e + f"/dataloader_idx_{i}" for e in expected}
          assert set(r) == expected
  
imports: import collections
  import itertools
  import os
  from contextlib import redirect_stdout
  from io import StringIO
  from unittest import mock
  from unittest.mock import ANY, call
  import numpy
  import pytest
  import torch
  from lightning.fabric.utilities.imports import _PYTHON_GREATER_EQUAL_3_8_0
  from lightning.pytorch import Trainer, callbacks
  from lightning.pytorch.callbacks.progress.rich_progress import _RICH_AVAILABLE
  from lightning.pytorch.demos.boring_classes import BoringModel, RandomDataset
  from lightning.pytorch.loggers import TensorBoardLogger
  from lightning.pytorch.loops import _EvaluationLoop
  from lightning.pytorch.trainer.states import RunningStage
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from torch import Tensor
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 7 for calling a global function with example usage: test_multi_dataloaders_add_suffix_properly(tmpdir, suffix) and returns: out, super, list