def METHOD_NAME(self, response_contents, correct_jsons):
    """Utility function that compares correct and real responses."""
    for username, content in response_contents.items():
        # Used in debugger for comparing objects.
        # self.maxDiff = None
        # We should compare top_words for manually,
        # because they are unsorted.
        keys_to_compare = set(content.keys()).difference({'top_words'})
        self.assertDictEqual(
            {k: content[k] for k in keys_to_compare},
            {k: correct_jsons[username][k] for k in keys_to_compare})
        # comparing top_words:
        top_words_content = sorted(
            content['top_words'],
            key=itemgetter('text')
        )
        top_words_correct = sorted(
            correct_jsons[username]['top_words'],
            key=itemgetter('text')
        )
        self.assertListEqual(top_words_content, top_words_correct)