code: def response(self, model=None, code=HTTPStatus.OK, description=None, **kwargs):
          code = HTTPStatus(code)
          if code is HTTPStatus.NO_CONTENT:
              assert model is None
          if model is None and code not in {HTTPStatus.ACCEPTED, HTTPStatus.NO_CONTENT}:
              if code.value not in http_exceptions.default_exceptions:
                  raise ValueError("`model` parameter is required for code %d" % code)
              model = self.model(
                  name='HTTPError%d' % code,
                  model=DefaultHTTPErrorSchema(http_code=code)
              )
          if description is None:
              description = code.description
          def response_serializer_decorator(func):
              def dump_wrapper(*args, **kwargs):
                  response = func(*args, **kwargs)
                  extra_headers = None
                  if response is None:
                      if model is not None:
                          raise ValueError("Response cannot not be None with HTTP status %d" % code)
                      return flask.Response(status=code)
                  elif isinstance(response, flask.Response) or model is None:
                      return response
                  elif isinstance(response, tuple):
                      response, _code, extra_headers = unpack(response)
                  else:
                      _code = code
                  if HTTPStatus(_code) is code:
                      response = model.dump(response).data
                  return response, _code, extra_headers
              return dump_wrapper
          def decorator(func_or_class):
              if code.value in http_exceptions.default_exceptions:
                  decorated_func_or_class = func_or_class
              elif isinstance(func_or_class, type):
                  func_or_class._apply_decorator_to_methods(response_serializer_decorator)
                  decorated_func_or_class = func_or_class
              else:
                  decorated_func_or_class = wraps(func_or_class)(
                      response_serializer_decorator(func_or_class)
                  )
              if model is None:
                  api_model = None
              else:
                  if isinstance(model, Model):
                      api_model = model
                  else:
                      api_model = self.model(model=model)
                  if getattr(model, 'many', False):
                      api_model = [api_model]
              doc_decorator = self.doc(
                      responses={
                              code.value: (description, api_model)
                          }
                  )
              return doc_decorator(decorated_func_or_class)
          return decorator