code: def is_active(ext, metadata, default=True):
      """Is the cell active for the given file extension?"""
      if metadata.get("run_control", {}).get("frozen") is True:
          return ext == ".ipynb"
      for tag in metadata.get("tags", []):
          if tag.startswith("active-"):
              return ext.replace(".", "") in tag.split("-")
      if "active" not in metadata:
          return default
      return ext.replace(".", "") in re.split(
          r"\.|,", metadata["active"]
      )
  
imports: import ast
  import re
  from json import dumps, loads
  from .languages import _JUPYTER_LANGUAGES
label_desc: Use image node_id 7 for calling a global function with example usage: is_active(ext, metadata, default) and returns: unknown, unknown, default, unknown