Off hand, I can think of the CreateCoffeePot example on GitHub. I need to update that example to define the relationships though. If anyone can chip in and help me complete the sample, I would appreciate it.
I think the problem is not really to create the relation. In order to create it, you have to know the faces from both of the parts (source and target) You have to find the desired Face object in the inserted part and then the target part and the Face object form this part.