code: def create_output_dir(config: dict, output_root: str, default_model_name: str='Unnamed') -> str:
      
      logging.info('Creating output dir')
  
      # create output dir
      model_name = default_model_name
      if 'name' not in config['model']:
          logging.warning('\tmodel.name not found in config, defaulting to: %s', model_name)
      else:
          model_name = config['model']['name']
  
      if not os.path.exists(output_root):
          logging.info('\tOutput root folder "%s" does not exist and will be created', output_root)
          os.makedirs(output_root)
  
      # keep trying to create new output dir until it succeeds
      # this is neccessary due to improbable yet possible output dir name conflicts
      while True:
          try:
              output_dir = path.join(output_root, '{}_{}_{}'.format(datetime.now().strftime('%Y-%m-%d-%H-%M-%S'),
                                                                    model_name, get_random_name()))
              os.mkdir(output_dir)
              break
          except OSError as ex:
              if ex.errno != errno.EEXIST:
                  raise ex
      logging.info('\tOutput dir: %s', output_dir)
  
      # create file logger
      file_handler = logging.FileHandler(path.join(output_dir, CXF_LOG_FILE))
      file_handler.setFormatter(logging.Formatter(CXF_LOG_FORMAT, datefmt=CXF_LOG_DATE_FORMAT))
      logging.getLogger().addHandler(file_handler)
  
      return output_dir
docs: Create output_dir under the given ``output_root`` and
          - dump the given config to YAML file under this dir
          - register a file logger logging to a file under this dir
  
      :param config: config to be dumped
      :param output_root: dir wherein output_dir shall be created
      :param default_model_name: name to be used when `model.name` is not found in the config
      :return: path to the created output_dir