code: func IsValidImportPath(v Value) (err error) {
  	switch v := v.(type) {
  	case Var:
  		if !v.Equal(DefaultRootDocument.Value) && !v.Equal(InputRootDocument.Value) {
  			return fmt.Errorf("invalid path %v: path must begin with input or data", v)
  		}
  	case Ref:
  		if err := IsValidImportPath(v[0].Value); err != nil {
  			return fmt.Errorf("invalid path %v: path must begin with input or data", v)
  		}
  		for _, e := range v[1:] {
  			if _, ok := e.Value.(String); !ok {
  				return fmt.Errorf("invalid path %v: path elements must be strings", v)
  			}
  		}
  	default:
  		return fmt.Errorf("invalid path %v: path must be ref or var", v)
  	}
  	return nil
  }
docs: // IsValidImportPath returns an error indicating if the import path is invalid.
  // If the import path is invalid, err is nil.