<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reformat_date(date, new_fmt='%Y-%m-%d'):
 """ Returns reformated date. :param date: The string date with this format %m/%d/%Y :type date: String :param new_fmt: date format string. Default is '%Y-%m-%d' :type date: String :returns: int :example: '1/05/2015' """

    try:
        if isinstance(date, datetime):
            return date.strftime(new_fmt)
        else:
            fmt = '%m/%d/%Y'
            return datetime.strptime(date, fmt).strftime(new_fmt)
    except ValueError:
        return date