docs: private static void submitTopologyToFile(TopologyAPI.Topology fTopology,
                                             Map<String, String> heronCmdOptions) {
      String dirName = heronCmdOptions.get(CMD_TOPOLOGY_DEFN_TEMPDIR);
      if (dirName == null || dirName.isEmpty()) {
        throw new TopologySubmissionException("Topology definition temp directory not specified. "
            + "Please set cmdline option: " + CMD_TOPOLOGY_DEFN_TEMPDIR);
      }
  
      String fileName =
          Paths.get(dirName, fTopology.getName() + TOPOLOGY_DEFINITION_SUFFIX).toString();
  
      try (FileOutputStream fos = new FileOutputStream(new File(fileName));
          BufferedOutputStream bos = new BufferedOutputStream(fos)) {
        byte[] topEncoding = fTopology.toByteArray();
        bos.write(topEncoding);
      } catch (IOException e) {
        throw new TopologySubmissionException("Error writing topology definition to temp directory: "
            + dirName, e);
      }
    }