@staticmethod<EOL><INDENT>def _merge_apis(collector):<DEDENT>
implicit_apis = []<EOL>explicit_apis = []<EOL>for logical_id, apis in collector:<EOL><INDENT>if logical_id == SamApiProvider._IMPLICIT_API_RESOURCE_ID:<EOL><INDENT>implicit_apis.extend(apis)<EOL><DEDENT>else:<EOL><INDENT>explicit_apis.extend(apis)<EOL><DEDENT><DEDENT>all_apis = {}<EOL>all_configs = explicit_apis + implicit_apis<EOL>for config in all_configs:<EOL><INDENT>for normalized_method in SamApiProvider._normalize_http_methods(config.method):<EOL><INDENT>key = config.path + normalized_method<EOL>all_apis[key] = config<EOL><DEDENT><DEDENT>result = set(all_apis.values())  <EOL>LOG.debug("<STR_LIT>",<EOL>len(explicit_apis), len(implicit_apis), len(result))<EOL>return list(result)<EOL>
Quite often, an API is defined both in Implicit and Explicit API definitions. In such cases, Implicit API
definition wins because that conveys clear intent that the API is backed by a function. This method will
merge two such list of Apis with the right order of precedence. If a Path+Method combination is defined
in both the places, only one wins.

Parameters
----------
collector : ApiCollector
    Collector object that holds all the APIs specified in the template

Returns
-------
list of samcli.commands.local.lib.provider.Api
    List of APIs obtained by combining both the input lists.