code: def __init__(self, path, canonical_name):
      self.config = configparser.ConfigParser()
  
      filepath = os.path.join(path, self.filename)
      if os.path.isfile(filepath):
          try:
              self.config.read(filepath)
          except Exception:
              errors.report(
                  f"Error reading {self.filename} for extension {canonical_name}.",
                  exc_info=True,
              )
  
      self.canonical_name = self.config.get(
          "Extension", "Name", fallback=canonical_name
      )
      self.canonical_name = canonical_name.lower().strip()
  
      self.requires = self.get_script_requirements(
          "Requires", "Extension"
      )
  
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 to create a new ExtensionMetadata object  with example: obj = ExtensionMetadata(path, canonical_name)