code: def list_extensions(settings_file):
      settings = {}
  
      try:
          if os.path.isfile(settings_file):
              with open(settings_file, "r", encoding="utf8") as file:
                  settings = json.load(file)
      except Exception:
          errors.report("Could not load settings", exc_info=True)
  
      disabled_extensions = set(settings.get("disabled_extensions", []))
      disable_all_extensions = settings.get(
          "disable_all_extensions", "none"
      )
  
      if (
          disable_all_extensions != "none"
          or args.disable_extra_extensions
          or args.disable_all_extensions
          or not os.path.isdir(extensions_dir)
      ):
          return []
  
      return [
          x
          for x in os.listdir(extensions_dir)
          if x not in disabled_extensions
      ]
  
imports: import logging
  import re
  import subprocess
  import os
  import shutil
  import sys
  import importlib.util
  import importlib.metadata
  import platform
  import json
  from functools import lru_cache
  from modules import cmd_args, errors
  from modules.paths_internal import script_path, extensions_dir
  from modules.timer import startup_timer
  from modules import logging_config
label_desc: Use image node_id 15 for calling a global function with example usage: list_extensions(settings_file) and returns: unknown, list