@staticmethod
    def _get_last_testcase(project_id, test_name_sha):
        most_recent_test = TestCase.query.filter(
            TestCase.project_id == project_id,
            TestCase.name_sha == test_name_sha,
        ).order_by(TestCase.date_created.desc()).limit(1).first()
        return most_recent_test
Get the most recent TestCase instance for the specified name.
dataset/ETHPy150Open dropbox/changes/changes/api/build_flaky_tests.py/BuildFlakyTestsAPIView._get_last_testcase