def METHOD_NAME(line):
    pattern = re.compile('.*?\[([^]]+)\].*')
    match = pattern.match(line)
    if match:
        timestamp_string = match.groups()[0]
        line_without_timestamp = line.replace('[{}]'.format(timestamp_string), '')
        try:
            timestamp = timestamp_from_string(timestamp_string)
            return timestamp, line_without_timestamp
        except ValueError as e:
            return None, line
    return None, line