code: private static Node getValueParent(Ref ref) {
      // there are four types of declarations: VARs, LETs, CONSTs, and ASSIGNs
      Node n = ref.getNode().getParent();
      return (n != null && NodeUtil.isNameDeclaration(n)) ? ref.getNode() : ref.getNode().getParent();
    }
docs: Gets the parent node of the value for any assignment to a Name.
  For example, in the assignment
  {@code var x = 3;}
  the parent would be the NAME node.