code: def get_plugins():
      plugins = []
      plugin_to_distinfo = dict(pm.list_plugin_distinfo())
      for plugin in pm.get_plugins():
          static_path = None
          templates_path = None
          if plugin.__name__ not in DEFAULT_PLUGINS:
              try:
                  if (
                      importlib_resources.files(plugin.__name__)
                      / "static"
                  ).is_dir():
                      static_path = str(
                          importlib_resources.files(plugin.__name__)
                          / "static"
                      )
                  if (
                      importlib_resources.files(plugin.__name__)
                      / "templates"
                  ).is_dir():
                      templates_path = str(
                          importlib_resources.files(plugin.__name__)
                          / "templates"
                      )
              except (TypeError, ModuleNotFoundError):
                  # Caused by --plugins_dir= plugins
                  pass
          plugin_info = {
              "name": plugin.__name__,
              "static_path": static_path,
              "templates_path": templates_path,
              "hooks": [h.name for h in pm.get_hookcallers(plugin)],
          }
          distinfo = plugin_to_distinfo.get(plugin)
          if distinfo:
              plugin_info["version"] = distinfo.version
              plugin_info["name"] = (
                  distinfo.name or distinfo.project_name
              )
          plugins.append(plugin_info)
      return plugins
  
imports: import importlib
  import os
  import pluggy
  import sys
  from .None import hookspecs
label_desc: Use image node_id 1 for calling a global function with example usage: get_plugins() and returns: plugins