code: def pkg_version_info(
      pkg_name: str | ModuleType,
  ) -> tuple[int, int, int]:
      if isinstance(pkg_name, ModuleType):
          pkg_name = pkg_name.__name__
      pkg_version = Version(get_pkg_version(pkg_name))
      return pkg_version.major, pkg_version.minor, pkg_version.micro
  
file_path: BentoML/src/bentoml/_internal/utils/pkg.py
imports: from __future__ import annotations
  import importlib.metadata
  import importlib.util
  from importlib.metadata import PackageNotFoundError
  from types import ModuleType
  from typing import cast
  from packaging.version import Version
label_desc: Use image node_id 1 for calling a global function with example usage: pkg_version_info(pkg_name) and returns: pkg_version,  pkg_version,  pkg_version