nodes: 0, module; 1, function_definition; 2, function_name:multi_load; 3, parameters; 4, block; 5, identifier:inputs; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, dictionary_splat_pattern; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, expression_statement; 14, comment:# Avoid to load schema more than twice.; 15, expression_statement; 16, if_statement; 17, expression_statement; 18, for_statement; 19, if_statement; 20, expression_statement; 21, return_statement; 22, identifier:ac_parser; 23, None; 24, identifier:ac_template; 25, False; 26, identifier:ac_context; 27, None; 28, identifier:options; 29, comment:r"""
      Load multiple config files.
  
      .. note::
  
         :func:`load` is a preferable alternative and this API should be used
         only if there is a need to emphasize given inputs are multiple ones.
  
      The first argument 'inputs' may be a list of a file paths or a glob pattern
      specifying them or a pathlib.Path object represents file[s] or a namedtuple
      'anyconfig.globals.IOInfo' object represents some inputs to load some data
      from.
  
      About glob patterns, for example, is, if a.yml, b.yml and c.yml are in the
      dir /etc/foo/conf.d/, the followings give same results::
  
        multi_load(["/etc/foo/conf.d/a.yml", "/etc/foo/conf.d/b.yml",
                    "/etc/foo/conf.d/c.yml", ])
  
        multi_load("/etc/foo/conf.d/*.yml")
  
      :param inputs:
          A list of file path or a glob pattern such as r'/a/b/\*.json'to list of
          files, file or file-like object or pathlib.Path object represents the
          file or a namedtuple 'anyconfig.globals.IOInfo' object represents some
          inputs to load some data from
      :param ac_parser: Forced parser type or parser object
      :param ac_template: Assume configuration file may be a template file and
          try to compile it AAR if True
      :param ac_context: Mapping object presents context to instantiate template
      :param options: Optional keyword arguments:
  
          - ac_dict, ac_ordered, ac_schema and ac_query are the options common in
            :func:`single_load`, :func:`multi_load`, :func:`load`: and
            :func:`loads`. See the descriptions of them in :func:`single_load`.
  
          - Options specific to this function and :func:`load`:
  
            - ac_merge (merge): Specify strategy of how to merge results loaded
              from multiple configuration files. See the doc of
              :mod:`anyconfig.dicts` for more details of strategies. The default
              is anyconfig.dicts.MS_DICTS.
  
            - ac_marker (marker): Globbing marker to detect paths patterns.
  
          - Common backend options:
  
            - ignore_missing: Ignore and just return empty result if given file
              'path' does not exist.
  
          - Backend specific options such as {"indent": 2} for JSON backend
  
      :return: Mapping object or any query result might be primitive objects
      :raises: ValueError, UnknownProcessorTypeError, UnknownFileTypeError
      """; 30, assignment; 31, assignment; 32, assignment; 33, assignment; 34, call; 35, block; 36, assignment; 37, identifier:path; 38, identifier:paths; 39, block; 40, comparison_operator:cnf is None; 41, block; 42, assignment; 43, call; 44, identifier:marker; 45, call; 46, identifier:schema; 47, call; 48, subscript; 49, None; 50, identifier:paths; 51, call; 52, attribute; 53, argument_list; 54, expression_statement; 55, identifier:cnf; 56, identifier:ac_context; 57, expression_statement; 58, expression_statement; 59, if_statement; 60, identifier:cnf; 61, None; 62, return_statement; 63, identifier:cnf; 64, call; 65, attribute; 66, argument_list; 67, attribute; 68, argument_list; 69, identifier:_maybe_schema; 70, argument_list; 71, identifier:options; 72, string:"ac_schema"; 73, attribute; 74, argument_list; 75, attribute; 76, identifier:are_same_file_types; 77, identifier:paths; 78, assignment; 79, assignment; 80, assignment; 81, identifier:cups; 82, block; 83, call; 84, identifier:_try_validate; 85, argument_list; 86, attribute; 87, identifier:query; 88, identifier:cnf; 89, dictionary_splat; 90, identifier:options; 91, identifier:setdefault; 92, string:"ac_marker"; 93, call; 94, keyword_argument; 95, keyword_argument; 96, dictionary_splat; 97, attribute; 98, identifier:expand_paths; 99, identifier:inputs; 100, keyword_argument; 101, identifier:anyconfig; 102, identifier:utils; 103, identifier:ac_parser; 104, call; 105, identifier:opts; 106, call; 107, identifier:cups; 108, call; 109, if_statement; 110, attribute; 111, argument_list; 112, identifier:cnf; 113, identifier:schema; 114, dictionary_splat; 115, identifier:anyconfig; 116, identifier:query; 117, identifier:options; 118, attribute; 119, argument_list; 120, identifier:ac_template; 121, identifier:ac_template; 122, identifier:ac_context; 123, identifier:ac_context; 124, identifier:options; 125, identifier:anyconfig; 126, identifier:utils; 127, identifier:marker; 128, identifier:marker; 129, identifier:find; 130, argument_list; 131, attribute; 132, argument_list; 133, identifier:_single_load; 134, argument_list; 135, comparison_operator:cnf is None; 136, block; 137, else_clause; 138, attribute; 139, identifier:convert_to; 140, dictionary; 141, dictionary_splat; 142, identifier:options; 143, identifier:options; 144, identifier:get; 145, string:"marker"; 146, string; 147, subscript; 148, keyword_argument; 149, identifier:options; 150, identifier:copy; 151, identifier:path; 152, keyword_argument; 153, keyword_argument; 154, keyword_argument; 155, dictionary_splat; 156, identifier:cnf; 157, None; 158, expression_statement; 159, block; 160, identifier:anyconfig; 161, identifier:dicts; 162, identifier:options; 163, string_content:*; 164, identifier:paths; 165, integer:0; 166, identifier:forced_type; 167, identifier:ac_parser; 168, identifier:ac_parser; 169, identifier:ac_parser; 170, identifier:ac_template; 171, identifier:ac_template; 172, identifier:ac_context; 173, identifier:cnf; 174, identifier:opts; 175, assignment; 176, expression_statement; 177, identifier:cnf; 178, identifier:cups; 179, call; 180, identifier:merge; 181, argument_list; 182, identifier:cnf; 183, identifier:cups; 184, dictionary_splat; 185, identifier:options
code: def multi_load(inputs, ac_parser=None, ac_template=False, ac_context=None,
                 **options):
      r"""
      Load multiple config files.
  
      .. note::
  
         :func:`load` is a preferable alternative and this API should be used
         only if there is a need to emphasize given inputs are multiple ones.
  
      The first argument 'inputs' may be a list of a file paths or a glob pattern
      specifying them or a pathlib.Path object represents file[s] or a namedtuple
      'anyconfig.globals.IOInfo' object represents some inputs to load some data
      from.
  
      About glob patterns, for example, is, if a.yml, b.yml and c.yml are in the
      dir /etc/foo/conf.d/, the followings give same results::
  
        multi_load(["/etc/foo/conf.d/a.yml", "/etc/foo/conf.d/b.yml",
                    "/etc/foo/conf.d/c.yml", ])
  
        multi_load("/etc/foo/conf.d/*.yml")
  
      :param inputs:
          A list of file path or a glob pattern such as r'/a/b/\*.json'to list of
          files, file or file-like object or pathlib.Path object represents the
          file or a namedtuple 'anyconfig.globals.IOInfo' object represents some
          inputs to load some data from
      :param ac_parser: Forced parser type or parser object
      :param ac_template: Assume configuration file may be a template file and
          try to compile it AAR if True
      :param ac_context: Mapping object presents context to instantiate template
      :param options: Optional keyword arguments:
  
          - ac_dict, ac_ordered, ac_schema and ac_query are the options common in
            :func:`single_load`, :func:`multi_load`, :func:`load`: and
            :func:`loads`. See the descriptions of them in :func:`single_load`.
  
          - Options specific to this function and :func:`load`:
  
            - ac_merge (merge): Specify strategy of how to merge results loaded
              from multiple configuration files. See the doc of
              :mod:`anyconfig.dicts` for more details of strategies. The default
              is anyconfig.dicts.MS_DICTS.
  
            - ac_marker (marker): Globbing marker to detect paths patterns.
  
          - Common backend options:
  
            - ignore_missing: Ignore and just return empty result if given file
              'path' does not exist.
  
          - Backend specific options such as {"indent": 2} for JSON backend
  
      :return: Mapping object or any query result might be primitive objects
      :raises: ValueError, UnknownProcessorTypeError, UnknownFileTypeError
      """
      marker = options.setdefault("ac_marker", options.get("marker", '*'))
      schema = _maybe_schema(ac_template=ac_template, ac_context=ac_context,
                             **options)
      options["ac_schema"] = None  # Avoid to load schema more than twice.
  
      paths = anyconfig.utils.expand_paths(inputs, marker=marker)
      if anyconfig.utils.are_same_file_types(paths):
          ac_parser = find(paths[0], forced_type=ac_parser)
  
      cnf = ac_context
      for path in paths:
          opts = options.copy()
          cups = _single_load(path, ac_parser=ac_parser,
                              ac_template=ac_template, ac_context=cnf, **opts)
          if cups:
              if cnf is None:
                  cnf = cups
              else:
                  merge(cnf, cups, **options)
  
      if cnf is None:
          return anyconfig.dicts.convert_to({}, **options)
  
      cnf = _try_validate(cnf, schema, **options)
      return anyconfig.query.query(cnf, **options)