original_docstring: 
      Generate default server config which use Apache Airflow as scheduler.
      
docstring: Generate default server config which use Apache Airflow as scheduler.
docstring_tokens: Generate default server config which use Apache Airflow as scheduler .
code: def create_server_config(root_dir_path, param: Dict[str, str]):
      """
      Generate default server config which use Apache Airflow as scheduler.
      """
      import notification_service.config_templates
      default_config_file_name = 'default_notification_server.yaml'
      config_file_name = 'notification_server.yaml'
  
      if not os.path.exists(root_dir_path):
          logging.info("{} does not exist, creating the directory".format(root_dir_path))
          os.makedirs(root_dir_path, exist_ok=False)
      default_server_config_path = os.path.join(
          os.path.dirname(notification_service.config_templates.__file__), default_config_file_name
      )
      if not os.path.exists(default_server_config_path):
          raise Exception("default notification server config is not found at {}.".format(default_server_config_path))
  
      server_config_target_path = os.path.join(root_dir_path, config_file_name)
      with open(default_server_config_path, encoding='utf-8') as config_file:
          default_config = config_file.read().format(**param)
      with open(server_config_target_path, mode='w', encoding='utf-8') as f:
          f.write(default_config)
      logging.info("Notification server config generated at {}".format(server_config_target_path))
      return server_config_target_path
code_tokens: def create_server_config ( root_dir_path , param : Dict [ str , str ] ) : import notification_service . config_templates default_config_file_name = 'default_notification_server.yaml' config_file_name = 'notification_server.yaml' if not os . path . exists ( root_dir_path ) : logging . info ( "{} does not exist, creating the directory" . format ( root_dir_path ) ) os . makedirs ( root_dir_path , exist_ok = False ) default_server_config_path = os . path . join ( os . path . dirname ( notification_service . config_templates . __file__ ) , default_config_file_name ) if not os . path . exists ( default_server_config_path ) : raise Exception ( "default notification server config is not found at {}." . format ( default_server_config_path ) ) server_config_target_path = os . path . join ( root_dir_path , config_file_name ) with open ( default_server_config_path , encoding = 'utf-8' ) as config_file : default_config = config_file . read ( ) . format ( ** param ) with open ( server_config_target_path , mode = 'w' , encoding = 'utf-8' ) as f : f . write ( default_config ) logging . info ( "Notification server config generated at {}" . format ( server_config_target_path ) ) return server_config_target_path
short_docstring: Generate default server config which use Apache Airflow as scheduler.
short_docstring_tokens: Generate default server config which use Apache Airflow as scheduler .
comment: """
      Generate default server config which use Apache Airflow as scheduler.
      """