<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def logpath2dt(filepath):
 """ given a dataflashlog in the format produced by Mission Planner, return a datetime which says when the file was downloaded from the APM """

    return datetime.datetime.strptime(re.match(r'.*/(.*) .*$',filepath).groups()[0],'%Y-%m-%d %H-%M')