code: def save_cfg(blocks, cfgfile):
      with open(cfgfile, "w") as fp:
          for block in blocks:
              fp.write("[%s]\n" % (block["type"]))
              for key, value in block.items():
                  if key != "type":
                      fp.write("%s=%s\n" % (key, value))
              fp.write("\n")
  
file_path: MMdnn/mmdnn/conversion/darknet/cfg.py
imports: import torch
  from collections import OrderedDict
label_desc: Use image node_id 3 for calling a global function with example usage: save_cfg(blocks, cfgfile) without return types