code: @Override
    Node getNodeForCodeInsertion(@Nullable JSModule module) {
      if (module == null) {
        if (moduleGraph == null || Iterables.isEmpty(moduleGraph.getAllInputs())) {
          throw new IllegalStateException("No inputs");
        }
        CompilerInput firstInput = Iterables.getFirst(moduleGraph.getAllInputs(), null);
        return firstInput.getAstRoot(this);
      }
  
      List<CompilerInput> moduleInputs = module.getInputs();
      if (!moduleInputs.isEmpty()) {
        return moduleInputs.get(0).getAstRoot(this);
      }
      throw new IllegalStateException("Root module has no inputs");
    }
docs: ------------------------------------------------------------------------