docs: def main(*argv):
      """ main driver of program """
      try:
          #   Inputs
          #
          adminUsername = argv[0]
          adminPassword = argv[1]
          siteURL = argv[2]
          username = argv[3]
          subFolders = argv[4].lower() == "true"
          #   Logic
          #
          sh = arcrest.AGOLTokenSecurityHandler(adminUsername, adminPassword)
          admin = arcrest.manageorg.Administration(url=siteURL,
                                                   securityHandler=sh)
          content = admin.content
          if isinstance(content, arcrest.manageorg._content.Content):pass
          usercontent = content.usercontent(username=username)
          res = usercontent.listUserContent(username=adminUsername)
          #   Delete Root Items
          #
          eItems = ""
          itemsToErase = ",".join([item['id'] for item in res['items']])
          usercontent.deleteItems(items=itemsToErase)
          #  Walk Each Folder and erase items if subfolder == True
          #
          if subFolders:
              for folder in res['folders']:
                  c = usercontent.listUserContent(username=username, folderId=folder['id'])
                  itemsToErase = ",".join([item['id'] for item in c['items']])
                  if len(itemsToErase.split(',')) > 0:
                      usercontent.deleteItems(items=itemsToErase)
                  del c
                  usercontent.deleteFolder(folderId=folder['id'])
                  del folder
  
          arcpy.AddMessage("User %s content has been deleted." % username)
          arcpy.SetParameterAsText(4, True)
      except arcpy.ExecuteError:
          line, filename, synerror = trace()
          arcpy.AddError("error on line: %s" % line)
          arcpy.AddError("error in file name: %s" % filename)
          arcpy.AddError("with error message: %s" % synerror)
          arcpy.AddError("ArcPy Error Message: %s" % arcpy.GetMessages(2))
      except FunctionError, f_e:
          messages = f_e.args[0]
          arcpy.AddError("error in function: %s" % messages["function"])
          arcpy.AddError("error on line: %s" % messages["line"])
          arcpy.AddError("error in file name: %s" % messages["filename"])
          arcpy.AddError("with error message: %s" % messages["synerror"])
          arcpy.AddError("ArcPy Error Message: %s" % messages["arc"])
      except:
          line, filename, synerror = trace()
          arcpy.AddError("error on line: %s" % line)
          arcpy.AddError("error in file name: %s" % filename)
          arcpy.AddError("with error message: %s" % synerror)