def METHOD_NAME():
  try:
    # finding the min and max {
    # Define a helper function to get node/zone id's from query string.
    def GetMinMaxIds(qstr):
        import string
        s = qstr.split(' ')
        retval = []
        nextGood = 0
        idType = 0
        for token in s:
            if token == "(zone" or token == "(cell":
                idType = 1
                nextGood = 1
                continue
            elif token == "(node":
                idType = 0
                nextGood = 1
                continue
            if nextGood == 1:
                nextGood = 0
                retval = retval + [(idType, int(token))]
        return retval
    # Set up a plot
    OpenDatabase("~juanita/silo/stuff/noise.silo")
    AddPlot("Pseudocolor", "hgslice")
    DrawPlots()
    Query("MinMax")
    # Do picks on the ids that were returned by MinMax.
    for ids in GetMinMaxIds(GetQueryOutputString()):
        idType = ids[0]
        id = ids[1]
        if idType == 0:
            PickByNode(id)
        else:
            PickByZone(id)
    # finding the min and max }
    TestValueEQ('finding the min and max error message',GetLastError(),'')
    TestPOA('finding the min and max exceptions')
  except Exception as inst:
    TestFOA('finding the min and max exception "%s"'%str(inst), LINE())
    pass
  vqr_cleanup()