code: def postprocess(self, model_outputs: ModelOutput) -> dict[str, t.Any]:
      assert self.model.config.id2label is not None
      logits: NDArray[t.Any] = t.cast(
          "torch.Tensor", model_outputs.logits[0]
      ).numpy()
      probabilities = softmax(logits)
  
      best_class = np.argmax(probabilities)
      label = t.cast(str, self.model.config.id2label[best_class])
      score = probabilities[best_class].item()
      logits = logits.tolist()
      return {"label": label, "score": score, "logits": logits}
  
imports: from __future__ import annotations
  import importlib
  import typing
  import numpy
  import requests
  import tensorflow
  import transformers
  from datasets import load_dataset
  from PIL import Image
  from transformers import Pipeline
  from transformers.pipelines import get_supported_tasks
  from transformers.pipelines import get_task
  from transformers.testing_utils import nested_simplify
  from transformers.trainer_utils import set_seed
  from transformers.utils import is_tf_available
  from transformers.utils import is_torch_available
  import bentoml
  from bentoml._internal.frameworks.transformers import SimpleDefaultMapping
  from bentoml._internal.frameworks.transformers import TaskDefinition
  from bentoml._internal.frameworks.transformers import convert_to_autoclass
  from bentoml._internal.frameworks.transformers import delete_pipeline
  from bentoml._internal.frameworks.transformers import register_pipeline
  from .None import FrameworkTestModel
  from .None import FrameworkTestModelConfiguration
  from .None import FrameworkTestModelInput
label_desc: Use image node_id 4 for calling the PairClassificationPipeline obj's underlying member method code with example usage: obj.postprocess(model_outputs) and returns: dict