code: private static void addDummyAssignment(Node node, String resultName) {
      checkArgument(node.isBlock());
  
      // A result is needed create a dummy value.
      Node srcLocation = node;
      Node retVal = NodeUtil.newUndefinedNode(srcLocation);
      Node resultNode = createAssignStatementNode(resultName, retVal);
      resultNode.useSourceInfoIfMissingFromForTree(node);
  
      node.addChildToBack(resultNode);
    }
docs: Example:
  a = (void) 0;