Hi Remington,
The ydk-gen generator tool parses the fully expanded yang tree and prints out this data as python files, including the paths for each of the containers/lists. You can see this by generating a bundle, for example, with the below commands
git clone https://github.com/CiscoDevNet/ydk-gen.git
cd ydk-gen
pip install -r requirements.txt
./generate.py --python --bundle profiles/bundles/ietf_0_1_4.json
ls gen-api/python/ietf-bundle/ydk/models/ietf
vi gen-api/python/ietf-bundle/ydk/models/ietf/ietf_interfaces.py
You may be interested in the below attributes of the generated classes:
self._segment_path = ..
self._absolute_path = ..
The python code for the generator including the parsing and printers is here. However, note that deviations are not considered above, but this could also be included with a few small code changes