code: def test_classification_outputs_multi_label():
      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(multi_label=True).transform(example_output)
          ),
          example_output,
      )
      assert torch.allclose(
          torch.tensor(
              ProbabilitiesOutput(multi_label=True).transform(
                  example_output
              )
          ),
          torch.sigmoid(example_output),
      )
      assert ClassesOutput(multi_label=True).transform(
          example_output
      ) == [1, 2]
      assert LabelsOutput(labels, multi_label=True).transform(
          example_output
      ) == ["class_2", "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 2 for calling a global function with example usage: test_classification_outputs_multi_label() without return types