#NEWLINE# def wrap( self , obj ) : #NEWLINE# #INDENT# if ( obj . __class__ is grid_file . GridIn ) : #NEWLINE# #INDENT# grid_in_class = create_class_with_framework ( AgnosticGridIn , self . _framework , self . __module__ ) #NEWLINE# return grid_in_class ( root_collection = self . collection , delegate = obj ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( obj . __class__ is grid_file . GridOut ) : #NEWLINE# #INDENT# grid_out_class = create_class_with_framework ( AgnosticGridOut , self . _framework , self . __module__ ) #NEWLINE# return grid_out_class ( root_collection = self . collection , delegate = obj ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( obj . __class__ is gridfs . GridOutCursor ) : #NEWLINE# #INDENT# grid_out_class = create_class_with_framework ( AgnosticGridOutCursor , self . _framework , self . __module__ ) #NEWLINE# return grid_out_class ( cursor = obj , collection = self . collection )