def extract_impression_id(line, assert_first_line=False):
    """
        Extracts the impression_id from a line
    """
    if type(line) == bytes:
        line = line.decode()
    return line[:line.index("|")].strip()