<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compare_trees(self, parsed_pytree, parsed_doctree):
 """Compare the given parsed trees. :param dict parsed_pytree: A dictionary representing the parsed Python tree where each key is a parsed Python file and its key is its expected rst file name. """

        if parsed_pytree == parsed_doctree:
            return 0

        missing_pys, missing_docs = self.calculate_tree_differences(pytree=parsed_pytree,
                                                                    doctree=parsed_doctree)
        self.pprint_tree_differences(missing_pys=missing_pys, missing_docs=missing_docs)
        return 0 if self.args.no_fail else 1