code: def guess_version(pkg_key, default='?'):
      
      try:
          m = import_module(pkg_key)
      except ImportError:
          return default
      else:
          return getattr(m, '__version__', default)
docs: Guess the version of a pkg when pip doesn't provide it
  
      :param str pkg_key: key of the package
      :param str default: default version to return if unable to find
      :returns: version
      :rtype: string