docs: def create_query_constraint():
      """ Create a constraint for a query WHERE clause """
      op = oneOf("= < > >= <= != <>", caseless=True).setName("operator")
      basic_constraint = (var + op + var_val).setResultsName("operator")
      between = (
          var + Suppress(upkey("between")) + value + Suppress(and_) + value
      ).setResultsName("between")
      is_in = (var + Suppress(upkey("in")) + set_).setResultsName("in")
      fxn = (
          function("attribute_exists", var)
          | function("attribute_not_exists", var)
          | function("attribute_type", var, types)
          | function("begins_with", var, Group(string))
          | function("contains", var, value)
          | (function("size", var) + op + value)
      ).setResultsName("function")
      all_constraints = between | basic_constraint | is_in | fxn
      return Group(all_constraints).setName("constraint")