code: def active():
      if (
          shared.cmd_opts.disable_all_extensions
          or shared.opts.disable_all_extensions == "all"
      ):
          return []
      elif (
          shared.cmd_opts.disable_extra_extensions
          or shared.opts.disable_all_extensions == "extra"
      ):
          return [x for x in extensions if x.enabled and x.is_builtin]
      else:
          return [x for x in extensions if x.enabled]
  
imports: from __future__ import annotations
  import configparser
  import os
  import threading
  import re
  from modules import shared, errors, cache, scripts
  from modules.gitpython_hack import Repo
  from modules.paths_internal import extensions_dir, extensions_builtin_dir, script_path
label_desc: Use image node_id 1 for calling a global function with example usage: active() and returns: list, unknown, unknown