import pkg_resources


def get_version(package_name, default='Unknown'):
  """Returns the package version, or default value."""
  try:
    return pkg_resources.get_distribution(package_name).version
  except (ImportError, pkg_resources.DistributionNotFound):
    return default