def METHOD_NAME(self, value):
    ops = {
        '$ge': '>=',
        '$gt': '>',
        '$lt': '<',
        '$le': '<=',
        '$ne': '!=',
        '$eq': '='
    }
    in_ops = {
        '$in': 'in',
        '$nin': 'not in'
    }
    if isinstance(value, dict):
        key, value = list(value.items())[0]
        if key in ops:
            op = ops[key]
            return op, value
        if key in in_ops:
            op = in_ops[key]
            if not isinstance(value, list):
                raise NotImplementedError(f'Unknown type {key}, {value}')
            value = Tuple(value)
            return op, value
        raise NotImplementedError(f'Unknown type {key}')
    elif isinstance(value, list):
        raise NotImplementedError(f'Unknown filter {value}')
    else:
        # is simple type
        op = '='
        value = value
        return op, value