def _handle_limits(self, q):
        # handle start, limit, and end
        if 'start' and 'end' in self.api_arguments:
            s = self.api_arguments['start']
            e = self.api_arguments['end']
            if e == 0:
                q = q.skip(s)
            else:
                q = q.slice(s, e)
        else:
            if 'start' in self.api_arguments:
                s = self.api_arguments['start']
                q = q.skip(s)
            if self.api_arguments in 'limit':
                limit = self.api_arguments['limit']
                q = q.limit(limit)
            else:
                q = q.limit(self.MAX_RESULTS)
        return q
dataset/ETHPy150Open JeffHeard/sondra/sondra/api.py/APIRequest._handle_limits/swapped operands of `in`