def get_list_id_from_knr(line):
    """
    Takes a line from csv file with a candidate number (knr) in it and
    returns the derived listnr for this candidate. Will also handle the new
    WabstiC Standard 2018.
    """
    if '.' in line.knr:
        return line.knr.split('.')[0]
    return line.knr[0:-2]
