code: def new_main(args):
      config_path = get_config_path()
      template_path = os.path.join(config_path, "template")
      if not os.path.isdir(template_path):
          raise IOError(
              "Can't find template configuration directory. Did you install GraphVite correctly?"
          )
  
      config = "_".join(args.application) + ".yaml"
      template = os.path.join(template_path, config)
      if args.file:
          config = args.file
      if os.path.isfile(template):
          if os.path.exists(config):
              answer = None
              while answer not in ["y", "n"]:
                  answer = input(
                      "File `%s` exists. Overwrite? (y/n)" % config
                  )
              if answer == "n":
                  return
          shutil.copyfile(template, config)
          print(
              "A configuration template has been written into `%s`."
              % config
          )
      else:
          templates = glob.glob(os.path.join(template_path, "*.yaml"))
          templates = sorted(templates)
          applications = [""]
          for template in templates:
              application = os.path.splitext(
                  os.path.basename(template)
              )[0]
              application = application.replace("_", " ")
              applications.append(application)
          raise ValueError(
              "Can't find a configuration template for `%s`. Available applications are %s"
              % (
                  " ".join(args.application),
                  "\n    ".join(applications),
              )
          )
  
imports: from __future__ import print_function, absolute_import
  import os
  import re
  import glob
  import yaml
  import shutil
  import logging
  import argparse
  from easydict import EasyDict
  import numpy
  import graphvite
  import graphvite.application
label_desc: Use image node_id 4 for calling a global function with example usage: new_main(args) without return types