code: def _update_plugin_settings(
      plugin_name, enabled=None, delete=False, **kwargs
  ):
      # This would ensure that the plugin actually exists
      # _get_plugin(plugin_name)
  
      # Plugins are enabled by default, so if we can't read the App config or it
      # doesn't exist, don't do anything
      okay_missing = enabled in (True, None) and not kwargs
  
      # Load existing App config, if any
      app_config_path = locate_app_config()
      if os.path.isfile(app_config_path):
          try:
              with open(app_config_path, "rt") as f:
                  app_config = json.load(f)
          except Exception as e:
              if okay_missing:
                  return
  
              raise ValueError(
                  f"Failed to parse App config at '{app_config_path}'"
              ) from e
      elif okay_missing:
          return
      else:
          app_config = {}
  
      if app_config.get("plugins") is None:
          app_config["plugins"] = {}
  
      plugins = app_config["plugins"]
  
      if delete:
          # Delete entire plugin entry
          plugins.pop(plugin_name, None)
      else:
          # Update plugin settings
          if not plugins.get(plugin_name):
              plugins[plugin_name] = {}
  
          plugin_settings = plugins[plugin_name]
  
          if enabled in (True, None):
              # Plugins are enabled by default, so just remove the entry altogether
              plugin_settings.pop("enabled", None)
              if not plugin_settings:
                  plugins.pop(plugin_name)
          else:
              plugin_settings["enabled"] = False
  
          plugin_settings.update(kwargs)
  
      with open(app_config_path, "wt") as f:
          json.dump(app_config, f, indent=4)
  
imports: from collections import Counter
  from dataclasses import dataclass
  import json
  import logging
  import os
  from packaging.requirements import Requirement
  import re
  import shutil
  import yaml
  import eta.core.utils
  import eta.core.web
  import fiftyone
  import fiftyone.constants
  from fiftyone.core.config import locate_app_config
  import fiftyone.core.utils
  from fiftyone.plugins.definitions import PluginDefinition
  from fiftyone.utils.github import GitHubRepository
label_desc: Use image node_id 29 for calling a global function with example usage: _update_plugin_settings(plugin_name, enabled, delete) without return types