<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def wfdb_strptime(time_string):
 """ Given a time string in an acceptable wfdb format, return a datetime.time object. Valid formats: SS, MM:SS, HH:MM:SS, all with and without microsec. """

    n_colons = time_string.count(':')

    if n_colons == 0:
        time_fmt = '%S'
    elif n_colons == 1:
        time_fmt = '%M:%S'
    elif n_colons == 2:
        time_fmt = '%H:%M:%S'

    if '.' in time_string:
        time_fmt += '.%f'

    return datetime.datetime.strptime(time_string, time_fmt).time()