code: def verify(self):
          
          collections = self.get_data_collections()
  
          allIDs = []
          for coll in collections:
              IDs = self.noteDB[coll].find({"ID": {"$exists": True}},
                                           {"ID": 1, "_id": 0})
              for ID in IDs:
                  allIDs.append(int(ID["ID"]))
  
          query = {"currentMax": {"$exists": True}}
          maxID = int(self.noteDB['IDs'].find_one(query)["currentMax"])
          query = {"unusedIDs": {"$exists": True}}
          unusedIDs = self.noteDB['IDs'].find_one(query)["unusedIDs"]
          unusedIDs = [int(ii) for ii in unusedIDs]
  
          unusedIDsMatch = True
          for ID in allIDs:
              if ID in unusedIDs:
                  unusedIDsMatch = False
  
          maxIDMatch = True
          if maxID is not max(allIDs):
              maxIDMatch = False
  
          if maxIDMatch and unusedIDsMatch:
              print "Database is valid"
          elif not maxIDMatch and not unusedIDsMatch:
              print "Database not valid, max ID and unused IDs are incorrent"
          elif not maxIDMatch:
              print "Database not valid, max ID is incorrent"
          elif not unusedIDsMatch:
              print "Database not valid, unusedIDs is incorrent"
docs: :desc: Verifies the integrity of the database, specifically checks
                     the values for unusedIDs and currentMax
              :returns: A boolean indicating whether the database is valid or
                        not
              :rval: bool