code: func ParseRef(input string) (Ref, error) {
  	term, err := ParseTerm(input)
  	if err != nil {
  		return nil, errors.Wrap(err, "failed to parse ref")
  	}
  	ref, ok := term.Value.(Ref)
  	if !ok {
  		return nil, fmt.Errorf("expected ref but got %v", term)
  	}
  	return ref, nil
  }
docs: // ParseRef returns exactly one reference.