code: def test_classification_outputs():
      example_output = torch.tensor([-0.1, 0.2, 0.3])  # 3 classes
      labels = ["class_1", "class_2", "class_3"]
  
      assert torch.allclose(
          torch.tensor(LogitsOutput().transform(example_output)),
          example_output,
      )
      assert torch.allclose(
          torch.tensor(ProbabilitiesOutput().transform(example_output)),
          torch.softmax(example_output, -1),
      )
      assert ClassesOutput().transform(example_output) == 2
      assert LabelsOutput(labels).transform(example_output) == "class_3"
  
file_path: lightning-flash/tests/core/test_classification.py
imports: import pytest
  import torch
  from flash.core.classification import ClassesOutput, FiftyOneLabelsOutput, LabelsOutput, LogitsOutput, ProbabilitiesOutput
  from flash.core.data.io.input import DataKeys
  from flash.core.utilities.imports import _FIFTYONE_AVAILABLE, _TOPIC_CORE_AVAILABLE, _TOPIC_IMAGE_AVAILABLE
label_desc: Use image node_id 1 for calling a global function with example usage: test_classification_outputs() without return types