code: def test_version_custom_pkgs():
      out = get_versions(
          [
              # Use custom function
              ("distributed", lambda mod: "123"),
              # Use version_of_package
              "notexist",
              ("pytest", None),  # has __version__
              "tornado",  # has version
              "math",  # has nothing
          ]
      )["packages"]
      assert out["distributed"] == "123"
      assert out["notexist"] is None
      assert out["pytest"] == pytest.__version__
      assert out["tornado"] == tornado.version
      assert out["math"] is None
  
imports: from __future__ import annotations
  import re
  import sys
  import pytest
  import tornado
  from distributed import Client, Worker
  from distributed.utils_test import gen_cluster
  from distributed.versions import error_message, get_versions
label_desc: Use image node_id 12 for calling a global function with example usage: test_version_custom_pkgs() without return types