<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def datetime_parser(s):
 """ Parse timestamp s in local time. First the arrow parser is used, if it fails, the parsedatetime parser is used. :param s: :return: """

    try:
        ts = arrow.get(s)
        # Convert UTC to local, result of get is UTC unless it specifies timezone, bonfire assumes
        # all time to be machine local
        if ts.tzinfo == arrow.get().tzinfo:
            ts = ts.replace(tzinfo='local')
    except:
        c = pdt.Calendar()
        result, what = c.parse(s)

        ts = None
        if what in (1, 2, 3):
            ts = datetime.datetime(*result[:6])

            ts = arrow.get(ts)
            ts = ts.replace(tzinfo='local')
            return ts

    if ts is None:
        raise ValueError("Cannot parse timestamp '" + s + "'")

    return ts