def test_langchain_feedback(self):
        """
        Check that LangChain feedback functions produce values within the expected range
        and adhere to the expected format.
        """
        from langchain_openai import ChatOpenAI
        from trulens.providers.langchain import Langchain

        llm = ChatOpenAI(model="gpt-4o", temperature=0)
        lc = Langchain(llm)

        tests = get_langchain_tests(lc)

        failed_tests = lambda: len(failed_subtests)
        total_tests = 0
        failed_subtests = []

        for imp, args, expected in tests:
            subtest_name = f"{imp.__name__}-{args}"
            actual = imp(**args)
            if "with_cot_reasons" in imp.__name__:
                actual = actual[0]  # Extract the actual score from the tuple.
            with self.subTest(subtest_name):
                total_tests += 1
                try:
                    self.assertAlmostEqual(actual, expected, delta=0.2)
                except AssertionError:
                    failed_subtests.append((subtest_name, actual, expected))

        if failed_tests() > 0:
            failed_subtests_str = ", ".join([
                f"{name} (actual: {act}, expected: {exp})"
                for name, act, exp in failed_subtests
            ])
            self.fail(
                f"{lc}: {failed_tests()}/{total_tests} tests failed ({failed_subtests_str})"
            )
        else:
            print(f"{lc}: {total_tests}/{total_tests} tests passed.")

        Check that LangChain feedback functions produce values within the expected range
        and adhere to the expected format.
        
tests/e2e/test_providers.py