code: def test_case(case):
      formatter = get_target_formatter(case.target)
  
      assert isinstance(formatter, case.target_formatter_type)
      assert formatter.labels == case.labels
      assert formatter.num_classes == case.num_classes
      assert [
          formatter(t) for t in case.target
      ] == case.formatted_target
  
file_path: lightning-flash/tests/core/data/utilities/test_classification.py
imports: import time
  from collections import namedtuple
  import numpy
  import pytest
  import torch
  from flash.core.data.utilities.classification import CommaDelimitedMultiLabelTargetFormatter, MultiBinaryTargetFormatter, MultiLabelTargetFormatter, MultiNumericTargetFormatter, MultiSoftTargetFormatter, SingleBinaryTargetFormatter, SingleLabelTargetFormatter, SingleNumericTargetFormatter, SpaceDelimitedTargetFormatter, get_target_formatter
  from flash.core.utilities.imports import _TOPIC_CORE_AVAILABLE
label_desc: Use image node_id 1 for calling a global function with example usage: test_case(case) without return types