# Path: t5/data/postprocessors.py
# def string_to_float(string, default=-1., **unused_kwargs):
# def lower_text(string, **unused_kwargs):
# def string_label_to_class_id(string_label,
#                              label_classes,
#                              default=-1,
#                              **unused_kwargs):
# def multirc(string_label, example=None, is_target=False):
# def qa(answer, example=None, is_target=False):
# def span_qa(answer, example=None, is_target=False):
# def wsc_simple(prediction, example=None, is_target=False):
#   def clean(s):
# def rank_classification(score, example=None, is_target=False):


from absl.testing import absltest
from t5.data import postprocessors
import numpy as np
        postprocessors.qa(
            "answer", example={"answers": [b"a1", b"a2"]}, is_target=True),
        ["a1", "a2"])
    self.assertEqual(postprocessors.qa("answer", is_target=False), "answer")

  def test_span_qa(self):
    self.assertEqual(
        postprocessors.span_qa(
            "answer",
            example={
                "answers": [b"a1", b"a2"],
                "context": b"Full context"
            },
            is_target=True), {
                "answers": ["a1", "a2"],
                "context": "Full context"
            })

    self.assertEqual(
        postprocessors.span_qa("answer", is_target=False), "answer")

  def test_wsc_simple(self):
    self.assertEqual(
        postprocessors.wsc_simple("blah", example={"label": 1}, is_target=True),
        1)
    self.assertEqual(
        postprocessors.wsc_simple(
            "blah", example={"label": -1}, is_target=True), -1)

    self.assertEqual(

# Path: t5/data/postprocessors.py
# def string_to_float(string, default=-1., **unused_kwargs):
# def lower_text(string, **unused_kwargs):
# def string_label_to_class_id(string_label,
#                              label_classes,
#                              default=-1,
#                              **unused_kwargs):
# def multirc(string_label, example=None, is_target=False):
# def qa(answer, example=None, is_target=False):
# def span_qa(answer, example=None, is_target=False):
# def wsc_simple(prediction, example=None, is_target=False):
#   def clean(s):
# def rank_classification(score, example=None, is_target=False):


# Path: t5/data/postprocessors_test.py
from absl.testing import absltest
from t5.data import postprocessors
import numpy as np

        postprocessors.qa(
            "answer", example={"answers": [b"a1", b"a2"]}, is_target=True),
        ["a1", "a2"])
    self.assertEqual(postprocessors.qa("answer", is_target=False), "answer")

  def test_span_qa(self):
    self.assertEqual(
        postprocessors.span_qa(
            "answer",
            example={
                "answers": [b"a1", b"a2"],
                "context": b"Full context"
            },
            is_target=True), {
                "answers": ["a1", "a2"],
                "context": "Full context"
            })

    self.assertEqual(
        postprocessors.span_qa("answer", is_target=False), "answer")

  def test_wsc_simple(self):
    self.assertEqual(
        postprocessors.wsc_simple("blah", example={"label": 1}, is_target=True),
        1)
    self.assertEqual(
        postprocessors.wsc_simple(
            "blah", example={"label": -1}, is_target=True), -1)

    self.assertEqual(

        postprocessors.wsc_simple(