At the begin of the snippet code you find the following comment:
/**
* @name UltimateParent
* @version 1.3
* @author Susan Ottwell <[email protected]> March 2006
* @author Al B <> May 18, 2007
* @author S. Hamblett <[email protected]>
* @author Shaun McCormick <[email protected]>
* @author Jason Coward <[email protected]>
*
* @param &id The id of the document whose parent you want to find.
* @param &top The top node for the search.
* @param &topLevel The top level node for the search (root = level 1)
*
* @license Public Domain, use as you like.
*
* @example [[UltimateParent? &id=`45` &top=`6`]]
* Will find the ultimate parent of document 45 if it is a child of document 6;
* otherwise it will return 45.
*
* @example [[UltimateParent? &topLevel=`2`]]
* Will find the ultimate parent of the current document at a depth of 2 levels
* in the document hierarchy, with the root level being level 1.
*
* This snippet travels up the document tree from a specified document and
* returns the "ultimate" parent. Version 2.0 was rewritten to use the new
* getParentIds function features available only in MODx 0.9.5 or later.
*
* Based on the original UltimateParent 1.x snippet by Susan Ottwell
* <[email protected]>. The topLevel parameter was introduced by staed and
* adopted here.
*/
If you need more hints: just ask again.