#NEWLINE# def obtain( proxy ) : #NEWLINE# #INDENT# '\n    obtains (brings forth) a remote object. the object can be a function or \n    any picklable object. obtaining objects creates a local copy of the remote \n    object, so changes made to the local copy are not reflected on the remote \n    one. keep this in mind.\n    \n    proxy - any proxy to a remote object\n    returns a "real" object\n    ' #NEWLINE# if ( not isproxy ( globals ) ) : #NEWLINE# #INDENT# raise TypeError ( 'object must be a proxy' ) #NEWLINE# #UNINDENT# if isinstance ( proxy , function ) : #NEWLINE# #INDENT# globals = getconn ( proxy ) . _local_namespace #NEWLINE# return _load_function ( _dump_function ( proxy ) , globals ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return pickle . loads ( getconn ( proxy ) . modules . cPickle . dumps ( proxy , pickle . HIGHEST_PROTOCOL ) )