code: def _process_methods(self, req, resp, resource):
          
          requested_method = self._get_requested_method(req)
          if not requested_method:
              return False
  
          if self._cors_config['allow_all_methods']:
              allowed_methods = self._get_resource_methods(resource)
              self._set_allowed_methods(resp, allowed_methods)
              if requested_method in allowed_methods:
                  return True
          elif requested_method in self._cors_config['allow_methods_list']:
              resource_methods = self._get_resource_methods(resource)
              # Only list methods as allowed if they exist
              # on the resource AND are in the allowed_methods_list
              allowed_methods = [
                  method for method in resource_methods
                  if method in self._cors_config['allow_methods_list']
              ]
              self._set_allowed_methods(resp, allowed_methods)
              if requested_method in allowed_methods:
                  return True
  
          return False
docs: Adds the Access-Control-Allow-Methods header to the response,
          using the cors settings to determine which methods are allowed.