code: def write_file(name, text, opts):
      """Write the output file for module/package <name>."""
      if opts.dryrun:
          return
      fname = os.path.join(opts.destdir, "%s.%s" % (name, opts.suffix))
      if not opts.force and os.path.isfile(fname):
          print("File %s already exists, skipping." % fname)
      else:
          print("Creating file %s." % fname)
          f = open(fname, "w")
          f.write(text)
          f.close()
  
file_path: holoviews/doc/generate_modules.py
imports: import os
  import optparse
label_desc: Use image node_id 2 for calling a global function with example usage: write_file(name, text, opts) without return types