code: func GetRef(c context.Context, pkg, ref string) (*Ref, error) {
  	r := &Ref{Name: ref, Package: PackageKey(c, pkg)}
  	switch err := datastore.Get(c, r); {
  	case err == datastore.ErrNoSuchEntity:
  		return nil, errors.Reason("no such ref").Tag(grpcutil.NotFoundTag).Err()
  	case err != nil:
  		return nil, errors.Annotate(err, "failed to fetch the ref").Tag(transient.Tag).Err()
  	}
  	return r, nil
  }
docs: // GetRef fetches the given ref.
  //
  // Returns gRPC-tagged NotFound error if there's no such ref.