def METHOD_NAME(key, indent):
    if key in refStack: return
    refStack.append(key)
    #for i in range(indent):
    #    print("   ", end='')
    print("%s%s" % ('   '*indent, fmtKey(key)))
    for type in rm.getTypes(page.location):
        for k in rm.getKeys(page.location, type):
            if (k is not None) and hasRef(k.object, key):
                METHOD_NAME(k, indent+1)
    refStack.pop()