code: def serialize(self, data):
          
  
          if not self.resp.content_type:
              self.resp.set_header('Content-Type', getattr(self, 'MIMETYPE'))
docs: Invoke the serializer
  
          These are common things for all serializers. Mostly,
          stuff to do with managing headers. The data passed
          in may not be reliable for much of anything.
  
          Conditionally, set the Content-Type header unless it
          has already been set.