<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_time_string(time_str):
 """ Get a datetime.time object from a string time representation. The start and end of acquisition are stored in the optional keyword parameters $BTIM and $ETIM. The following formats are used according to the FCS standard: - FCS 2.0: 'hh:mm:ss' - FCS 3.0: 'hh:mm:ss[:tt]', where 'tt' is optional, and represents fractional seconds in 1/60ths. - FCS 3.1: 'hh:mm:ss[.cc]', where 'cc' is optional, and represents fractional seconds in 1/100ths. This function attempts to transform these formats to 'hh:mm:ss:ffffff', where 'ffffff' is in microseconds, and then parse it using the datetime module. Parameters: time_str : str, or None String representation of time, or None. Returns: -------- t : datetime.time, or None Time parsed from `time_str`. If parsing was not possible, return None. If `time_str` is None, return None """

        # If input is None, return None
        if time_str is None:
            return None

        time_l = time_str.split(':')
        if len(time_l) == 3:
            # Either 'hh:mm:ss' or 'hh:mm:ss.cc'
            if '.' in time_l[2]:
                # 'hh:mm:ss.cc' format
                time_str = time_str.replace('.', ':')
            else:
                # 'hh:mm:ss' format
                time_str = time_str + ':0'
            # Attempt to parse string, return None if not possible
            try:
                t = datetime.datetime.strptime(time_str, '%H:%M:%S:%f').time()
            except:
                t = None
        elif len(time_l) == 4:
            # 'hh:mm:ss:tt' format
            time_l[3] = '{:06d}'.format(int(float(time_l[3])*1e6/60))
            time_str = ':'.join(time_l)
            # Attempt to parse string, return None if not possible
            try:
                t = datetime.datetime.strptime(time_str, '%H:%M:%S:%f').time()
            except:
                t = None
        else:
            # Unknown format
            t = None

        return t