code: private static boolean isTopLevelAssignTarget(Node n) {
      Node ancestor = n.getParent();
      while (ancestor.isAssign()) {
        ancestor = ancestor.getParent();
      }
      return ancestor.isExprResult();
    }
docs: Whether the given node is the target of a (possibly chained) assignment