code: def formatResults(self, op, results):
          
          formatted_results = ""
  
          if op == 'add':
              # list, alternating ident, uid
              formatted_results += "user(s) added:\n"
              for user in results:
                  if isinstance(user, str):
                      formatted_results += "identifier: %s\n" % user
                  else:
                      formatted_results += "uid: %d\n\n" % user
          elif op == 'remove':
              # list of dictionaries
              formatted_results += "user(s) removed:\n"
              for user in results:
                  if user:
                      formatted_results += "identifier: %s\n" % (user)
          elif op == 'update':
              # list, alternating ident, None
              formatted_results += "user(s) updated:\n"
              for user in results:
                  if user:
                      formatted_results += "identifier: %s\n" % (user)
          elif op == 'get':
              # list of dictionaries
              formatted_results += "user(s) found:\n"
              for user in results:
                  if user:
                      for key in sorted(user.keys()):
                          if key != 'bb_password':
                              formatted_results += "%s: %s\n" % (key, user[key])
                      formatted_results += "\n"
                  else:
                      formatted_results += "no match found\n"
          return formatted_results
docs: This formats the results of the database operations for printing
          back to the caller
  
          @param op: operation to perform (add, remove, update, get)
          @type op: string
  
          @param results: results from db queries in perspective_commandline
          @type results: list
  
          @returns: string containing formatted results