code: def render(self, bbox, width=None, height=None):
          
          width = width or self.tilesize
          height = height or self.tilesize
          self._prepare_rendering(bbox, width=width, height=height)
  
          # Render image with default Agg renderer
          tmpfile = NamedTemporaryFile(delete=False)
          im = mapnik.Image(width, height)
          mapnik.render(self._mapnik, im)
          im.save(tmpfile.name, 'png256')  # TODO: mapnik output only to file?
          tmpfile.close()
          content = open(tmpfile.name, 'rb').read()
          os.unlink(tmpfile.name)
          return content
docs: Render the specified tile with Mapnik