Returns the connections attached to the shape. You can optionally specify to return only the incoming or outgoing connections.
If not parameter specified all connections are returned, if "in" then only the incoming (i.e. towards the shape) are returned, if "out" the only the outgoing (i.e. away from the shape) are returned.