def _parse_expires(expires):
<EOL>if expires is None or expires in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>try:<EOL><INDENT>return dateutil.parser.parse(unicode(expires))<EOL><DEDENT>except ValueError as exc:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>exp = pdt.parse(expires)[<NUM_LIT:0>]<EOL>return datetime.datetime.fromtimestamp(time.mktime(exp))<EOL><DEDENT>except ValueError as exc:<EOL><INDENT>pass<EOL><DEDENT>raise NipapValueError("<STR_LIT>")<EOL>
Parse the 'expires' attribute, guessing what format it is in and
        returning a datetime