code: def test_eval_epoch_logging(
      tmpdir, batches, log_interval, max_epochs
  ):
      class TestModel(BoringModel):
          def on_validation_epoch_end(self):
              self.log(
                  "c",
                  torch.tensor(2),
                  on_epoch=True,
                  prog_bar=True,
                  logger=True,
              )
              self.log("d/e/f", 2)
  
      model = TestModel()
  
      trainer = Trainer(
          default_root_dir=tmpdir,
          limit_train_batches=batches,
          limit_val_batches=batches,
          max_epochs=max_epochs,
          log_every_n_steps=log_interval,
          enable_model_summary=False,
      )
      trainer.fit(model)
  
      # assert the loggers received the expected number
      logged_metrics = set(trainer.logged_metrics)
      assert logged_metrics == {"c", "d/e/f"}
  
      pbar_metrics = set(trainer.progress_bar_metrics)
      assert pbar_metrics == {"c"}
  
      # make sure all the metrics are available for callbacks
      callback_metrics = set(trainer.callback_metrics)
      assert callback_metrics == (logged_metrics | pbar_metrics)
      assert all(
          isinstance(v, Tensor)
          for v in trainer.callback_metrics.values()
      )
      assert all(
          isinstance(v, Tensor) for v in trainer.logged_metrics.values()
      )
      assert all(
          isinstance(v, float)
          for v in trainer.progress_bar_metrics.values()
      )
  
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 3 for calling a global function with example usage: test_eval_epoch_logging(tmpdir, batches, log_interval, max_epochs) without return types