Something that needs to be appended after line 61 is filtering out management interfaces. Most of the time these are setup with DHCP or static IPs to a managmenet network and don't need ptp links with the rest of the mesh.
for each interface for the host which has LLDP neighbors
for interface in topology[host]:
#Ignore mangement port
if "Management1" not in interface["local_int"]: