def render(self, data, accepted_media_type=None, renderer_context=None):
        self.set_filename(self.basename(data), renderer_context)
        fp = data['image']
        try:
            fp.seek(0, 2)
        except __HOLE__:
            size = os.path.getsize(fp)
            fp = open(fp)
        else:
            size = fp.tell()
            fp.seek(0)
        self.set_response_length(size, renderer_context)
        return fp
dataset/ETHPy150Open bkg/django-spillway/spillway/renderers/gdal.py/BaseGDALRenderer.render