sort results by given criteria

def sortBy(self, *args):
        '''sort results by given criteria'''
        criteria = ['seeds', 'size']
        for k in args:
            if k in criteria:
                self.results = sorted(
                    self.results, key=attrgetter(k), reverse=True)
        return self