code: public static void runDOT(Reader r, String format, File out) throws IOException {
          String[] dotCommand = buildDOTCommand(format, "-o" + out.getAbsolutePath());
  
          try {
              ProcessUtil.invokeProcess(dotCommand, r, LOGGER::warn);
          } catch (InterruptedException ex) {
              LOGGER.error("Interrupted while waiting for 'dot' process to exit.", ex);
          }
      }
docs: Invokes the GraphVIZ DOT utility for rendering graphs, writing output to the specified file.
  
  @param r
  the reader from which the GraphVIZ description is read.
  @param format
  the output format to produce.
  @param out
  the file to which the output is written.
  
  @throws IOException
  if an I/O error occurs reading from the given input or writing to the output file.