'Return top words from all words, filtered by number of
occurences
:param dict_obj: all words
:type dict_obj: dict
:param amount: number of words to be in top dict
:type amount: int
:rtype: dict'

def top_dict(self, dict_obj, amount):

    return dict(sorted(dict_obj.items(), key=(lambda x: x[1]), reverse=True)[:amount])
