def METHOD_NAME(self, name: str) -> PackageEntry:
    """ Return a package referenced by name.
    If the package is not found PackageNotFoundError is thrown.
    Args:
        name: Package name.
    Returns:
        PackageInfo object.
    Raises:
        PackageNotFoundError: When package called name was not found.
    """
    try:
        pkg = self._database[name]
    except KeyError:
        raise PackageNotFoundError(name)
    return replace(pkg)