def decode_cursor(self, cursor):
        try:
            cursor = cursor.encode('ascii')
            cursor = base64.urlsafe_b64decode(cursor)
            cursor = cursor.decode('utf-8')
            cursor = json.loads(cursor)
        except (TypeError, __HOLE__):
            raise ApiError(400, {'code': 'invalid_cursor.encoding'})

        return cursor
dataset/ETHPy150Open 4Catalyzer/flask-resty/flask_resty/pagination.py/IdCursorPagination.decode_cursor