docstr: Write the config to the YAML file
  
  Args:
      model (ModelGraph): the hls4ml model.
docstr_tok: ["Write","the","config","to","the","YAML","file","Args",":","model","(","ModelGraph",")",":","the","hls4ml","model","."]
code: def write_yml(self, model):
      """Write the config to the YAML file
  
      Args:
          model (ModelGraph): the hls4ml model.
      """
  
      def keras_model_representer(dumper, keras_model):
          model_path = model.config.get_output_dir() + "/keras_model.h5"
          keras_model.save(model_path)
          return dumper.represent_scalar("!keras_model", model_path)
  
      try:
          from tensorflow.keras import Model as KerasModel
  
          yaml.add_multi_representer(
              KerasModel, keras_model_representer
          )
      except Exception:
          pass
  
      with open(
          model.config.get_output_dir() + "/" + config_filename, "w"
      ) as file:
          yaml.dump(model.config.config, file)
  
imports: import glob
  import os
  import tarfile
  from collections import OrderedDict
  from shutil import copyfile, copytree, rmtree
  import numpy
  import yaml
  from hls4ml.writer.writers import Writer
label_desc: Use image node_id 15 for calling the VivadoWriter obj's underlying member method code with example usage: obj.write_yml(model) and returns: dumper