code: def delete_for_users(gis, ignore_accounts, target_accounts):
      """deletes items and groups for users in target_accounts, and ignore others"""
      for user in gis.users.search():
          if (
              user.username not in ignore_accounts
              and not user.username.startswith("esri_")
          ):
              print(
                  "-*-*-*-*-*-*-Delete groups & items & user for %s -*-*-*-*-*-"
                  % user.username
              )
              delete_items(gis, user)
              delete_groups(gis, user)
              delete_services_from_servers(gis, user)
              try:
                  user.delete()
              except:
                  print("could not delete user %s" % user.username)
          elif user.username in target_accounts:
              print(
                  "-*-*-*-*-*-*-Delete groups & items for %s -*-*-*-*-*-*-*-*-"
                  % user.username
              )
              delete_items(gis, user)
              delete_groups(gis, user)
              delete_services_from_servers(gis, user)
          else:
              print(
                  "-*-*-*-*-*-*-*-*-No Delete for %s -*-*-*-*-*-*-*-*-*-*-"
                  % user.username
              )
      print(
          "-*-*-*-*-*-*-Delete intermediate analysis services owned by admin -*-*-*-*-*-"
      )
      delete_services_from_servers(gis)
  
file_path: arcgis-python-api/misc/_common.py
imports: from arcgis.gis import GIS
label_desc: Use image node_id 6 for calling a global function with example usage: delete_for_users(gis, ignore_accounts, target_accounts) without return types