@Override
 public void visitTransform(TransformTreeNode node) {
   toFinalize.removeAll(node.getInput().expand());
   AppliedPTransform<?, ?, ?> appliedTransform = getAppliedTransform(node);
   stepNames.put(appliedTransform, genStepName());
   if (node.getInput().expand().isEmpty()) {
     rootTransforms.add(appliedTransform);
   } else {
     for (PValue value : node.getInput().expand()) {
       valueToConsumers.get(value).add(appliedTransform);
     }
   }
 }
 private AppliedPTransform<?, ?, ?> getAppliedTransform(TransformTreeNode node) {
   @SuppressWarnings({"rawtypes", "unchecked"})
   AppliedPTransform<?, ?, ?> application =
       AppliedPTransform.of(
           node.getFullName(),
           node.getInput(),
           node.getOutput(),
           (PTransform) node.getTransform());
   return application;
 }