code: def test_native_print_results_encodings(monkeypatch, encoding):
      import lightning.pytorch.loops.evaluation_loop as imports
  
      monkeypatch.setattr(imports, "_RICH_AVAILABLE", False)
  
      out = mock.Mock()
      out.encoding = encoding
      with redirect_stdout(out) as out:
          _EvaluationLoop._print_results(*inputs0)
  
      # Attempt to encode everything the file is told to write with the given encoding
      for call_ in out.method_calls:
          name, args, _ = call_
          if name == "write":
              args[0].encode(encoding)
  
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 16 for calling a global function with example usage: test_native_print_results_encodings(monkeypatch, encoding) without return types