I'm just starting out in PDFlib, and the manual (for PDFlib 8) says to get the scope ...
You can query the current scope with the scope parameter.
But I have no idea how to get at that parameter, and internet searches are getting me nowhere because "get scope" is everywhere.
There may be a better way, but I found that this seems to work...
myPDF.get_parameter('scope', 0)