def METHOD_NAME(args, prologue=None, epilogue=None, out=sys.stdout):
  parser = OptionParser(
    description="Generate the dispatcher include file for using "+
      "locally installed GUI (and related) libraries.  (Used in Phenix "+
      "installer and binary cctbx_plus builds.)")
  parser.add_option("--suffix", dest="suffix", action="store",
    help="Suffix for dispatcher_include file", default="gui")
  parser.add_option("--build_dir", dest="build_dir", action="store",
    help="Build directory (and dispatcher destination)", default=os.getcwd())
  parser.add_option("--prologue", dest="prologue", action="store",
    help="Additional dispatcher include to prepend")
  parser.add_option("--epilogue", dest="epilogue", action="store",
    help="Additional dispatcher include to append")
  parser.add_option("--base_dir", dest="base_dir", action="store",
    help="Directory for base packages (Python etc.)", default=None)
  parser.add_option("--ignore_missing_dirs", dest="ignore_missing_dirs",
    action="store_true", help="Don't raise error if GTK paths don't exist")
  parser.add_option("--quiet", action="store_true")
  parser.add_option("--use_conda", dest="use_conda", action="store_true",
    help="Use conda dependencies")
  # this is detached in case we need to upgrade GTK - setting GTK_PATH is
  # essential for the themes to be used correctly
  parser.add_option("--gtk_version", dest="gtk_version", action="store",
    help="Version number (major.minor.rev) for GTK+", default="2.10.0")
  options, args = parser.parse_args(args)
  build_path = options.build_dir
  if (not os.path.isdir(build_path)):
    raise OSError("The specified build directory (%s) does not exist." %
      build_path)
  build_path = os.path.abspath(build_path)
  base_path = options.base_dir
  if (base_path is None):
    base_path = os.path.join(build_path, "base")
  if (not os.path.isdir(base_path)):
    raise OSError("%s does not exist." % base_path)
  base_path = os.path.abspath(base_path)
  ld_library_paths = [ os.path.join(base_path, "lib"), ]
  if (sys.platform.startswith('linux')):
    lib64_path = os.path.join(base_path, "lib64")
    if (os.path.isdir(lib64_path)):
      ld_library_paths.append(lib64_path)
  dyld_library_paths = ld_library_paths
  if not options.use_conda and sys.platform == "darwin":
    dyld_library_paths += [
    os.path.join(base_path,"Python.framework","Versions","Current","lib"), ]
  check_libs = ld_library_paths
  if (sys.platform == "darwin") : check_libs = dyld_library_paths
  if sys.platform != "win32":
    for lib_dir in check_libs :
      if (not os.path.isdir(lib_dir)):
        raise OSError("%s does not exist." % lib_dir)
  gtk_path = os.path.join(base_path, "lib", "gtk-2.0", options.gtk_version)
  if ((sys.platform.startswith("linux")) and
      (not os.path.isdir(gtk_path)) and
      (not options.ignore_missing_dirs)):
    raise OSError("The path for the specified version of GTK+ does not "+
      "exist (%s)." % gtk_path)
  dispatcher = os.path.join(build_path, "dispatcher_include_%s.sh" %
    options.suffix)
  if sys.platform == "win32":
    dispatcher = os.path.join(build_path, "dispatcher_include_%s.bat" %
      options.suffix)
  f = open(dispatcher, "w")
  if (prologue is not None):
    f.write(prologue + "\n")
  if (options.prologue is not None):
    if not os.path.exists(options.prologue) and options.prologue.find("\n")>-1:
      f.write("%s\n" % options.prologue)
    else:
      f.write(open(options.prologue).read() + "\n")
  if sys.platform != "win32" and not options.use_conda:
    print("""\