def __enter__(self):
        """Open MemoryFile, write data and return."""
        self.fio_memfile = MemoryFile()
        with self.fio_memfile.open(
            schema=self.schema,
            driver=self.driver,
            crs=self.tile.crs
        ) as dst:
            dst.writerecords(self.features)
        return self.fio_memfile
def __enter__ ( self ) : self . fio_memfile = MemoryFile ( ) with self . fio_memfile . open ( schema = self . schema , driver = self . driver , crs = self . tile . crs ) as dst : dst . writerecords ( self . features ) return self . fio_memfile
Open MemoryFile, write data and return.