code: def get_package_versions() -> Dict[str, str]:
      """Gets a dictionary of package name -> package version for every package installed in the environment"""
      import pkg_resources
  
      package_dict = pkg_resources.working_set.by_key  # type: ignore
      package_version_dict = {
          key: val.version for key, val in package_dict.items()
      }
      return package_version_dict
  
file_path: autogluon/common/src/autogluon/common/utils/utils.py
imports: import logging
  import os
  import platform
  import sys
  from datetime import datetime
  from hashlib import md5
  from pathlib import Path
  from typing import Any, Dict, Optional
  import numpy
  import pandas
  from ..version import __version__
label_desc: Use image node_id 3 for calling a global function with example usage: get_package_versions() and returns: package_version_dict