def _serialize(self):
<EOL>if self._defcode is None:<EOL><INDENT>raise exceptions.UnboundResponse()<EOL><DEDENT>resp = self.response_class(request=self.req, status=self.code,<EOL>headerlist=self._headers.items())<EOL>if self.result:<EOL><INDENT>resp.content_type = self.content_type<EOL>resp.body = self.serializer(self.result)<EOL><DEDENT>return resp<EOL>
Serialize the ResponseObject.  Returns a webob `Response`
object.