<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _match_to_morph_parents(self, type, results):
 """ Match the results for a given type to their parent. :param type: The parent type :type type: str :param results: The results to match to their parent :type results: Collection """

        for result in results:
            if result.get_key() in self._dictionary.get(type, []):
                for model in self._dictionary[type][result.get_key()]:
                    model.set_relation(
                        self._relation, Result(result, self, model, related=result)
                    )