code: def add_config_path(path):
      
      if not os.path.isfile(path):
          warnings.warn("Config file does not exist: {path}".format(path=path))
          return False
  
      # select parser by file extension
      _base, ext = os.path.splitext(path)
      if ext and ext[1:] in PARSERS:
          parser = ext[1:]
      else:
          parser = PARSER
      parser_class = PARSERS[parser]
  
      _check_parser(parser_class, parser)
      if parser != PARSER:
          msg = (
              "Config for {added} parser added, but used {used} parser. "
              "Set up right parser via env var: "
              "export LUIGI_CONFIG_PARSER={added}"
          )
          warnings.warn(msg.format(added=parser, used=PARSER))
  
      # add config path to parser
      parser_class.add_config_path(path)
      return True
docs: Select config parser by file extension and add path into parser.