code: def test_evaluation_loop_non_sequential_mode_supprt(
      tmp_path, mode, expected, fn
  ):
      iterables = {"a": [0, 1, 2], "b": {3, 4}}
      cl = CombinedLoader(iterables, mode)
      seen = []
  
      class MyModel(BoringModel):
          def validation_step(self, batch, batch_idx):
              seen.append(batch)
  
          def test_step(self, batch, batch_idx):
              seen.append(batch)
  
      model = MyModel()
      trainer = Trainer(default_root_dir=tmp_path, barebones=True)
  
      trainer_fn = getattr(trainer, fn)
      trainer_fn(model, cl)
  
      assert trainer.num_sanity_val_batches == []  # this is fit-only
      actual = (
          trainer.num_val_batches
          if fn == "validate"
          else trainer.num_test_batches
      )
      assert actual == [3, 2]
      assert seen == expected
  
imports: from unittest import mock
  from unittest.mock import Mock, call
  import pytest
  import torch
  from lightning.fabric.accelerators.cuda import _clear_cuda_memory
  from lightning.pytorch import LightningModule, Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel, RandomDataset
  from lightning.pytorch.utilities import CombinedLoader
  from torch.utils.data.dataloader import DataLoader
  from torch.utils.data.sampler import BatchSampler, RandomSampler
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 9 for calling a global function with example usage: test_evaluation_loop_non_sequential_mode_supprt(tmp_path, mode, expected, fn) without return types