<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_api_config_response(self, config_json):
 """Parses a JSON API config and registers methods for dispatch. Side effects: Parses method name, etc. for all methods and updates the indexing data structures with the information. Args: config_json: A dict, the JSON body of the getApiConfigs response. """

    with self._config_lock:
      self._add_discovery_config()
      for config in config_json.get('items', []):
        lookup_key = config.get('name', ''), config.get('version', '')
        self._configs[lookup_key] = config

      for config in self._configs.itervalues():
        name = config.get('name', '')
        api_version = config.get('api_version', '')
        path_version = config.get('path_version', '')
        sorted_methods = self._get_sorted_methods(config.get('methods', {}))


        for method_name, method in sorted_methods:
          self._save_rest_method(method_name, name, path_version, method)