code: def for_all_pckg(packages, fun, add_additional_packages=True):
      """Iterates over all packages, executes a function. Returns all function results as a list"""
      ret = []
      for pckg in all_packages:
          if pckg.key in packages:
              ret.append(fun(pckg))
      additional = []
      if add_additional_packages:
          # add all remaining used packages with default versions
          additional = [
              v for v in packages if v not in all_packages_keys
          ]
      return ret + additional
  
imports: import argparse
  import sys
  from pip._vendor.packaging.version import parse
  import urllib.parse
  from urllib.request import urlopen, HTTPError, Request, URLError
label_desc: Use image node_id 3 for calling a global function with example usage: for_all_pckg(packages, fun, add_additional_packages) and returns: unknown