How to get the node from shape/picture

consider the following diagram


on click on the pencil icon expand function is called i want to get the node in which the picture i place is clicked
this is the expand function

this is the clickable picture

obj.part