ah we actually have an example of exactly that setup in the addGroom autorig component.
Theoretically the most generic answer would be an invokation of the graph itself. But in most cases you can avoid that. It can also have a performance impact if you constantly need to run you whole rig just to get an xform value out. Luckily we usually all the data needed to get that rest info directly at your disposal when you build your component.
And in your cases its very convenient you can simply use a prim constraint IN you component script on your rest shape to quickly generate the rest for you. Its a very easy trick to get rests for those kinds of setups.
I added a small snippet to your example where exactly that is happening. And i marked the important section. The rest is nothing but a small apex script version of what you where doing in the graphs
In the picture you can also see the important bits as nodes: You get your rest shape. You generate a prim constraint in the component script and then you multiply the inverted primconstraint_xform with the the xform from your guide.