I'm trying to render this cue Image on the top right corner of the nodes but this property is not taking any values other than "top-left". It does not render anything on providing any other string/function.
The document says it takes in a function but I'm not able to figure out how to use this. I have checked their source code, looked for similar open repos but none to avail.
expandCollapseCuePosition: 'top-left', // default cue position is top left you can specify a function per node too
Any help is appreciated. Thank You.

We can create a function like this.
EDIT: We have to update the position after expanding a node
The above coordinates are suitable for rectangle-shaped nodes. I created an equation to get the position for circle shapes too.