       nearbyports = new go.Set(/*go.GraphObject*/);
            nearbyparts.each((n) => {
              if (n instanceof go.Node) {
                nearbyports.addAll(n.ports);
              }
            });
          }

          const pit = nearbyports.iterator;
          while (pit.next()) {
            const p = pit.value;
            if (!this.compatiblePorts(port, p)) continue;
            const ppt = p.getDocumentPoint(go.Spot.Center);
            const d = ppt.distanceSquaredPoint(portPt);
       