@classmethod<EOL><INDENT>def from_clause(cls, clause):<DEDENT>
fn_name = clause[<NUM_LIT:0>]<EOL>if fn_name == "<STR_LIT:size>":<EOL><INDENT>return SizeConstraint.from_clause(clause)<EOL><DEDENT>elif fn_name == "<STR_LIT>":<EOL><INDENT>return TypeConstraint.from_clause(clause)<EOL><DEDENT>else:<EOL><INDENT>fn_name = clause[<NUM_LIT:0>]<EOL>field = clause[<NUM_LIT:1>]<EOL>if len(clause) > <NUM_LIT:2>:<EOL><INDENT>return cls(fn_name, field, resolve(clause[<NUM_LIT:2>]))<EOL><DEDENT>else:<EOL><INDENT>return cls(fn_name, field)<EOL><DEDENT><DEDENT>
Factory method