class_docstr: Class describing a cuda package with a key/name and a dictionary where the key
  is a cuda version and value is the list of directly accessible http links
  
  When it asked for a package version it checks compatible platform tags and provides
  a download link to a compatible package
  
  Parameters
  ----------
  `key`: str
      Name this package should be queried for
  `versions`: str or PckgVer class object
      Dictionary, where the key is a cuda version and vale, is the list
      of directly accessible http links. `{platform}` inside the link is replaced by the
      compatible platform tag provided by pip
  `name`: str, , optional, default = None
      Name of this package used during installation. If empty it is the same as the key.
      If it includes `{cuda_v}` it is replaced by the cuda_version when queried
class_docstr_tok: ["Class","describing","a","cuda","package","with","a","key\/name","and","a","dictionary","where","the","key","is","a","cuda","version","and","value","is","the","list","of","directly","accessible","http","links","When","it","asked","for","a","package","version","it","checks","compatible","platform","tags","and","provides","a","download","link","to","a","compatible","package","Parameters","--","--","--","--","--","`","key","`",":","str","Name","this","package","should","be","queried","for","`","versions","`",":","str","or","PckgVer","class","object","Dictionary",",","where","the","key","is","a","cuda","version","and","vale",",","is","the","list","of","directly","accessible","http","links",".","`","{","platform","}","`","inside","the","link","is","replaced","by","the","compatible","platform","tag","provided","by","pip","`","name","`",":","str",",",",","optional",",","default","=","None","Name","of","this","package","used","during","installation",".","If","empty","it","is","the","same","as","the","key",".","If","it","includes","`","{","cuda_v","}","`","it","is","replaced","by","the","cuda_version","when","queried"]
docstr: Checks if a provided url is available for a given cuda version
  
  It checks what package is available and is compatible with the available platforms
  returned by the pip
  
  Parameters
  ----------
  `url`: str
      Package url to be tested. `{cuda_v}` is replaced by cuda_version and  `{platform}`
      by the platform tag
  `cuda_version`: str
      Cuda version used for this query
docstr_tok: ["Checks","if","a","provided","url","is","available","for","a","given","cuda","version","It","checks","what","package","is","available","and","is","compatible","with","the","available","platforms","returned","by","the","pip","Parameters","--","--","--","--","--","`","url","`",":","str","Package","url","to","be","tested",".","`","{","cuda_v","}","`","is","replaced","by","cuda_version","and","`","{","platform","}","`","by","the","platform","tag","`","cuda_version","`",":","str","Cuda","version","used","for","this","query"]
code: def get_pyvers_name(self, url, cuda_version):
      """Checks if a provided url is available for a given cuda version
  
      It checks what package is available and is compatible with the available platforms
      returned by the pip
  
      Parameters
      ----------
      `url`: str
          Package url to be tested. `{cuda_v}` is replaced by cuda_version and  `{platform}`
          by the platform tag
      `cuda_version`: str
          Cuda version used for this query
      """
      if isinstance(p.get_supported()[0], tuple):
          # old PIP returns tuple
          for py_ver in [
              (x, y, z)
              for (x, y, z) in p.get_supported()
              if y != "none" and "any" not in y
          ]:
              py_ver = "-".join(py_ver)
              ret = self.test_request(
                  url.format(platform=py_ver, cuda_v=cuda_version)
              )
              if ret:
                  return ret
      else:
          # new PIP returns object
          for py_ver in [
              tag
              for tag in p.get_supported()
              if tag.abi != "none" and tag.platform != "any"
          ]:
              py_ver = str(py_ver)
              ret = self.test_request(
                  url.format(platform=py_ver, cuda_v=cuda_version)
              )
              if ret:
                  return ret
      return ""
  
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 5 for calling the CudaHttpPackage obj's underlying member method code with example usage: obj.get_pyvers_name(url, cuda_version) and returns: str, ret, ret