    def to_pykwargs(self):
        """Put the query to simple Python keyword representation"""

        def _get_key_value(left, right):
            is_left_key = isinstance(left, Key)
            is_right_key = isinstance(right, Key)
            if is_left_key and is_right_key:
                raise ValueError("Both cannot be keys")
            if is_left_key:
                return left.name, right
            if is_right_key:
                return right.name, left
            raise ValueError("Neither are keys")
        py_query = {}
        qry = self
        if self == true:
            return {}
        if not isinstance(self, All):
            qry = (self,)
        for sub_qry in qry:
            if isinstance(sub_qry, Equal):
                key, value = _get_key_value(sub_qry.left, sub_qry.right)
                py_query[key] = value
            elif isinstance(sub_qry, (GreaterEqual, LessEqual)):
                key, value = _get_key_value(sub_qry.left, sub_qry.right)
                past_min_val = py_query.get(key, (None, None))[0]
                past_max_val = py_query.get(key, (None, None))[1]
                if isinstance(sub_qry, LessEqual):
                    min_val = past_min_val
                    max_val = value
                elif isinstance(sub_qry, GreaterEqual):
                    min_val = value
                    max_val = past_max_val
                py_query[key] = (min_val, max_val)
            else:
                raise TypeError(f"No conversion for type: {type(sub_qry)}")
        return py_query
Put the query to simple Python keyword representation
rocketry/pybox/query/base.py