def parse_net_names(linerecords):
    """Given a netlist linerecord file, generates a dict of net ID => name mappings"""
    netnames = linerecords["Nets names"]
    splitlines = (line.partition(" ") for line in netnames)
    return {
        int(split[0][1:]): split[2] # [1:]: Throw away $ sign or whatever sign is used
        for split in splitlines
    }