Hi
I checked your file and it’s hard to see a pattern because the text is not inserted to the same position relative to the object, not even for text within the same layers. For this reason I think it would be difficult to design a graph for this issue
Then I would like to advice you to read this thread How to get help on the Dynamo forums - FAQ - Dynamo (dynamobim.com). Normally the standard reply to a thread where the threadstarter ask “Tell me how to do this” is “What have you tried so far, and can you upload your graph”