<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_date(date_string, ignoretz=True):
 """Parse a string as a date. If the string fails to parse, `None` will be returned instead datetime.datetime(2017, 8, 15, 18, 24, 31) Args: date_string (`str`):
 Date in string format to parse ignoretz (`bool`):
 If set ``True``, ignore time zones and return a naive :class:`datetime` object. Returns: `datetime`, `None` """

    try:
        return parser.parse(date_string, ignoretz=ignoretz)
    except TypeError:
        return None