def _post_parse(self):
        # parse unknown entities
        for test_id in self._unknown_entities:
            # NOTE(andreykurilin): When whole TestCase is marked as skipped
            # or failed, there is only one event with reason and status, so
            # we should modify all tests of TestCase manually.
            matcher = lambda i: i == test_id or i.startswith("%s." % test_id)
            known_ids = filter(matcher, self._tests)
            for id_ in known_ids:
                if self._tests[id_]["status"] == "init":
                    self._tests[id_]["status"] = (
                        self._unknown_entities[test_id]["status"])
                if self._unknown_entities[test_id].get("reason"):
                    self._tests[id_]["reason"] = (
                        self._unknown_entities[test_id]["reason"])
                elif self._unknown_entities[test_id].get("traceback"):
                    self._tests[id_]["traceback"] = (
                        self._unknown_entities[test_id]["traceback"])

        # parse expected failures
        for test_id in self._expected_failures:
            if self._tests.get(test_id):
                if self._tests[test_id]["status"] == "fail":
                    self._tests[test_id]["status"] = "xfail"
                    if self._expected_failures[test_id]:
                        self._tests[test_id]["reason"] = (
                            self._expected_failures[test_id])
                elif self._tests[test_id]["status"] == "success":
                    self._tests[test_id]["status"] = "uxsuccess"

        # decode data
        for test_id in self._tests:
            for file_name in ["traceback", "reason"]:
                # FIXME(andreykurilin): decode fields based on mime_type
                if self._tests[test_id] in file_name:
                    self._tests[test_id][file_name] = (
                        encodeutils.safe_decode(
                            self._tests[test_id][file_name]))

        self._is_parsed = True
dataset/ETHPy150Open openstack/rally/rally/common/io/subunit_v2.py/SubunitV2StreamResult._post_parse/swapped operands of `in`