def test_hugs(self):
        """
        Check that HuggingFace moderation feedback functions produce a value in the
        0-1 range only. And also make sure to check the reason of feedback function.
        Only checks each feedback function once.
        """

        h = huggingface_provider.Huggingface()

        tests = get_huggingface_tests(h)
        funcs = set()

        for imp, args, _ in tests:
            # only one test per feedback function:
            if imp in funcs:
                continue
            funcs.add(imp)

            with self.subTest(f"{imp.__name__}-{args}"):
                if ("language_match" in imp.__name__) or (
                    "pii_detection_with_cot_reasons" in imp.__name__
                ):
                    result = imp(**args)
                    self.assertIsInstance(
                        result, tuple, "Result should be a tuple."
                    )
                    self.assertEqual(
                        len(result), 2, "Tuple should have two elements."
                    )
                    score, details = result
                    self.assertIsInstance(
                        score,
                        float,
                        "First element of tuple should be a float.",
                    )
                    self.assertGreaterEqual(
                        score,
                        0.0,
                        "First element of tuple should be greater than or equal to 0.0.",
                    )
                    self.assertLessEqual(
                        score,
                        1.0,
                        "First element of tuple should be less than or equal to 1.0.",
                    )
                    self.assertIsInstance(
                        details,
                        dict,
                        "Second element of tuple should be a dict.",
                    )
                else:
                    result = imp(**args)
                    self.assertGreaterEqual(
                        result,
                        0.0,
                        "First element of tuple should be greater than or equal to 0.0.",
                    )
                    self.assertLessEqual(
                        result,
                        1.0,
                        "First element of tuple should be less than or equal to 1.0.",
                    )

        Check that HuggingFace moderation feedback functions produce a value in the
        0-1 range only. And also make sure to check the reason of feedback function.
        Only checks each feedback function once.
        
tests/e2e/test_providers.py