code: def _format_pkg(pkg):
      return {
          "name": pkg.metadata["Name"],
          "summary": _strip_guildai_suffix(
              pkg.metadata.get("Summary", "")
          ),
          "version": pkg.metadata["Version"],
      }
  
file_path: guildai/guild/commands/packages_impl.py
imports: import logging
  import os
  import re
  from guild import cli
  from guild import namespace
  from guild import pip_util
  from guild import util
label_desc: Use image node_id 4 for calling a global function with example usage: _format_pkg(pkg) and returns: dict