docstr: Copy the nnet_utils, AP types headers and any custom source to the project output directory
  
  Args:
      model (ModelGraph): the hls4ml model.
docstr_tok: ["Copy","the","nnet_utils",",","AP","types","headers","and","any","custom","source","to","the","project","output","directory","Args",":","model","(","ModelGraph",")",":","the","hls4ml","model","."]
code: def write_nnet_utils(self, model):
      """Copy the nnet_utils, AP types headers and any custom source to the project output directory
  
      Args:
          model (ModelGraph): the hls4ml model.
      """
  
      # nnet_utils
      filedir = os.path.dirname(os.path.abspath(__file__))
  
      srcpath = os.path.join(
          filedir, "../templates/quartus/firmware/nnet_utils/"
      )
      dstpath = f"{model.config.get_output_dir()}/firmware/nnet_utils/"
  
      if not os.path.exists(dstpath):
          os.mkdir(dstpath)
  
      headers = [
          os.path.basename(h) for h in glob.glob(srcpath + "*.h")
      ]
  
      for h in headers:
          copyfile(srcpath + h, dstpath + h)
  
      # ac_types
      filedir = os.path.dirname(os.path.abspath(__file__))
  
      srcpath = os.path.join(filedir, "../templates/quartus/ac_types/")
      dstpath = f"{model.config.get_output_dir()}/firmware/ac_types/"
  
      if os.path.exists(dstpath):
          rmtree(dstpath)
  
      copytree(srcpath, dstpath)
  
      # custom source
      filedir = os.path.dirname(os.path.abspath(__file__))
  
      custom_source = get_backend("Quartus").get_custom_source()
      for dst, srcpath in custom_source.items():
          dstpath = f"{model.config.get_output_dir()}/firmware/{dst}"
          copyfile(srcpath, dstpath)
  
imports: import glob
  import os
  import tarfile
  from collections import OrderedDict
  from shutil import copyfile, copytree, rmtree
  import numpy
  import yaml
  from hls4ml.backends import get_backend
  from hls4ml.model.layers import Conv1D, Conv2D, Conv2DBatchnorm, Dense
  from hls4ml.utils.fixed_point_utils import FixedPointEmulator, ceil_log2, uint_to_binary
  from hls4ml.writer.writers import Writer
label_desc: Use image node_id 16 for calling the QuartusWriter obj's underlying member method code with example usage: obj.write_nnet_utils(model) without return types