@classmethod<EOL><INDENT>def construct_from_string(cls, string):<DEDENT>
if (isinstance(string, str) and<EOL>(string.startswith('<STR_LIT>') or<EOL>string.startswith('<STR_LIT>')) or<EOL>isinstance(string, ABCDateOffset)):<EOL><INDENT>try:<EOL><INDENT>return cls(freq=string)<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>raise TypeError("<STR_LIT>")<EOL>
Strict construction from a string, raise a TypeError if not
possible