class_docstr: Class describing basic methods that package should provide
  
  Parameters
  ----------
  `key`: str
      Name this package should be queried for
  `versions`: str or PckgVer class object
      List of versions this package is available for
  `name`: str, optional, default = None
      Name of this package used during installation. If empty it is the same as the key
class_docstr_tok: ["Class","describing","basic","methods","that","package","should","provide","Parameters","--","--","--","--","--","`","key","`",":","str","Name","this","package","should","be","queried","for","`","versions","`",":","str","or","PckgVer","class","object","List","of","versions","this","package","is","available","for","`","name","`",":","str",",","optional",",","default","=","None","Name","of","this","package","used","during","installation",".","If","empty","it","is","the","same","as","the","key"]
docstr: Obtains alias for given version if exists. Otherwise return None
  
  Parameters
  ----------
  `version`: str or PckgVer
      Package version
docstr_tok: ["Obtains","alias","for","given","version","if","exists",".","Otherwise","return","None","Parameters","--","--","--","--","--","`","version","`",":","str","or","PckgVer","Package","version"]
code: def get_alias(version):
      """Obtains alias for given version if exists. Otherwise return None
  
      Parameters
      ----------
      `version`: str or PckgVer
          Package version
      """
      return getattr(version, "alias", None)
  
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 the BasePackage obj's underlying member method code with example usage: obj.get_alias(version) and returns: getattr