For clarity, I want to say that `CHILDREN` and `PARENT` reference a concept in Lucid known as groups.
In Lucid, it is possible to group multiple objects together, which allows you to treat all of the combined things as a single “shape”. This “grouped shape”, or just “group”, can have data, independently of all of the shapes and lines that are in it. If a shape is part of a group `PARENT` is how you get a reference to that group, and potentially its data, while if you have a group with formulas on it, `CHILDREN` is how you get all of the elements of the group. This has nothing to do with physical location; grouped shapes can have any relationship to each other, and the group automatically spans all of the contained shapes and lines.
Unfortunately, it also has another meaning. if you use `PARENT` on a non-grouped object, it will return a reference to the page that contains it. If you `CHILDREN` on a page, it returns a list of all free shapes on the page. Confusing, I know.
I don’t believe we currently have a formula that represents physical containment like you are trying to get here. I’m sorry, but doing that safely has proven to be a difficult problem to solve.