code: def check_package(package_name, expected_version=None):
      mod = importlib.import_module(package_name)
  
      if expected_version is not None:
          assert hasattr(
              mod, "__version__"
          ), f"Imported package {package_name} does not have __version__ attribute"
          version = mod.__version__
          assert (
              version == expected_version
          ), f"Version mismatch for package {package_name}: got {version} but expected {expected_version}"
  
label_desc: Use image node_id 1 for calling a global function with example usage: check_package(package_name, expected_version) without return types