This follows up on the discussion here: IHP-GmbH/IHP-Open-PDK#484
There are some minor improvements suggested. But mainly some code that checks if ever top level pin of a circuit is connected to a net with the same name. A suggested name is "flag_missing_ports" for this function.