def __deserialize_date(self, string):
try:<EOL><INDENT>from dateutil.parser import parse<EOL>return parse(string).date()<EOL><DEDENT>except ImportError:<EOL><INDENT>return string<EOL><DEDENT>except ValueError:<EOL><INDENT>raise ApiException(<EOL>status=<NUM_LIT:0>,<EOL>reason="<STR_LIT>"<EOL>.format(string)<EOL>)<EOL><DEDENT>
Deserializes string to date.

:param string: str.
:return: date.