code: def get_links_indices(packages, cuda_version):
      """Get all urls with direct links for given packages"""
      ret = for_all_pckg(
          packages,
          lambda pckg: pckg.get_links_index(cuda_version),
          add_additional_packages=False,
      )
      # add all remaining used packages with default versions
      return " ".join(ret)
  
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 8 for calling a global function with example usage: get_links_indices(packages, cuda_version) and returns: str