How to Limit the Number of Connections in GraphNode

Godot Version

4.3

Question

I want to make it so that only one node can be connected to a GraphNode, not several, how can this be implemented?

I tried to use the function is_node_connected(from_node,from_port,to_node,to_port), but it requires all parameters to be set, and I want to restrict the connection of any node if it is already connected, and not a specific one