docs: def from_clause(cls, clause):
          """ Factory method """
          fn_name = clause[0]
          if fn_name == "size":
              return SizeConstraint.from_clause(clause)
          elif fn_name == "attribute_type":
              return TypeConstraint.from_clause(clause)
          else:
              fn_name = clause[0]
              field = clause[1]
              if len(clause) > 2:
                  return cls(fn_name, field, resolve(clause[2]))
              else:
                  return cls(fn_name, field)