code: def get_versions(
      packages: Iterable[
          str | tuple[str, Callable[[ModuleType], str | None]]
      ]
      | None = None
  ) -> dict[str, dict[str, Any]]:
      """Return basic information on our software installation, and our installed versions
      of packages
      """
      return {
          "host": get_system_info(),
          "packages": get_package_info(
              chain(
                  required_packages, optional_packages, packages or []
              )
          ),
      }
  
file_path: distributed/distributed/versions.py
imports: from __future__ import annotations
  import importlib
  import os
  import platform
  import struct
  import sys
  from collections.abc import Callable, Iterable
  from itertools import chain
  from types import ModuleType
  from typing import Any
  from packaging.requirements import Requirement
label_desc: Use image node_id 1 for calling a global function with example usage: get_versions(packages) and returns: dict