def METHOD_NAME(line):
    line = line.strip()
    if len(line) > 0:
        line = encode(line)
        if valid(line):
            return line
        else:
            stats["num_filtered"] += 1
    else:
        stats["num_empty"] += 1
    return None