code: def _parse_classification_result(
      classification_result: classification_pb2.ClassificationResult,
      classify_output_spec: _ClassifyOutputType,
  ) -> _FeatureListType:
      """Parses ClassificationResult."""
      output_features = []
      classes = classification_result.classifications[0].classes
      if classify_output_spec.label_column:
          output_features.append(
              (
                  classify_output_spec.label_column,
                  [c.label for c in classes],
              )
          )
      if classify_output_spec.score_column:
          output_features.append(
              (
                  classify_output_spec.score_column,
                  [c.score for c in classes],
              )
          )
      return output_features
  
file_path: tfx/tfx/components/bulk_inferrer/prediction_to_example_utils.py
imports: from typing import Any, List, Tuple, Union
  import numpy
  import tensorflow
  from tfx.proto import bulk_inferrer_pb2
  from tensorflow_serving.apis import classification_pb2
  from tensorflow_serving.apis import prediction_log_pb2
label_desc: Use image node_id 4 for calling a global function with example usage: _parse_classification_result(classification_result, classify_output_spec) and returns: output_features