def METHOD_NAME(lines: List[str], match_id: int) -> match.Match:
    """Processes a log"""
    lines = [line.strip('\r\n') for line in lines]
    APP.logger.info('importing {0}'.format(match_id))
    local = import_header(lines, match_id)
    if local.has_unexpected_third_game is None:
        local.has_unexpected_third_game = False
    lines = lines[4:]
    while lines[0] != '':
        lines = lines[1:]
    game_id = 0
    game_lines: List[str] = []
    for line in lines:
        m = re.match(REGEX_GAME_HEADER, line)
        gm = re.match(REGEX_GATHERLING, line)
        gr = re.match(REGEX_ROUND, line)
        if m:
            new_id = int(m.group('id'))
            if game_id == 0:
                game_id = new_id
            elif new_id != game_id:
                game.insert_game(game_id, match_id, '\n'.join(game_lines))
                game_id = new_id
                game_lines = []
        elif re.match(REGEX_SWITCHEROO, line):
            local.has_unexpected_third_game = True
            game_lines.append(line)
        elif gm:
            tname = gm.group(1)
            APP.logger.info('Gatherling Event: {0}'.format(tname))
            process_tourney_info(local, tname=tname)
            game_lines.append(line)
        elif gr:
            roundnum = gr.group(1)
            APP.logger.info('Gatherling Round: {0}'.format(roundnum))
            process_tourney_info(local, roundnum=roundnum)
            game_lines.append(line)
        else:
            game_lines.append(line)
    game.insert_game(game_id, match_id, '\n'.join(game_lines))
    return local