code: def write_generated(filename, generated):
      with open(filename, "wb") as f:
          write_content = generated.encode("utf_8")
          write_content = write_content.replace(b"\r\n", b"\n")
          write_content = write_content.replace(b"\r", b"\n")
          f.write(write_content)
  
imports: from __future__ import print_function
  from collections import OrderedDict
  from os.path import abspath, join, dirname, exists
  from utils.common import check_update
  from utils.type_conv import type_from_proto
  import time
  import yaml
label_desc: Use image node_id 4 for calling a global function with example usage: write_generated(filename, generated) without return types