def lineToId(line: str):
    """ get the id of a line, e.g. part which specifies which figure it refers to """
    line = line.strip()
    line = line.split('.ax_dict')[0]
    if line.startswith('fig = '):
        line = line[len('fig = '):]
    return line
