def close(self):
        """Make GridOut more generically file-like."""
        if self.__chunk_iter:
            self.__chunk_iter.close()
            self.__chunk_iter = None
Make GridOut more generically file-like.
stackoverflow/venv/lib/python3.6/site-packages/gridfs/grid_file.py