See the RSL depth() function in the RenderMan documentation.

VOP nodes