def group_records_by_category(self):
        """Return the records grouped by the category of their source.
        
        The return value is a dict, a key in this dict is a category
        and the value is a list of all the records with this category.
        
        """
        Source.validate_categories(categories)
        key_function = lambda record: record.source.category
        return self.group_records(key_function)
Return the records grouped by the category of their source.
        
        The return value is a dict, a key in this dict is a category
        and the value is a list of all the records with this category.