def migrate_legacy_obj(legacy_guid_file):
 logger.info('Migrating legacy Guid {0}'.format(legacy_guid_file._id))
 storage_obj = get_or_create_storage_file(legacy_guid_file.node, legacy_guid_file.name, _id=legacy_guid_file._id)
 guid_obj = Guid.load(legacy_guid_file._id)
 guid_obj.referent = storage_obj
 guid_obj.save()
 return storage_obj

def migrate_legacy_obj ( legacy_guid_file ) : logger . info ( 'Migrating legacy Guid {0}' . format ( legacy_guid_file . _id ) ) storage_obj = get_or_create_storage_file ( legacy_guid_file . node , legacy_guid_file . name , _id = legacy_guid_file . _id ) guid_obj = Guid . load ( legacy_guid_file . _id ) guid_obj . referent = storage_obj guid_obj . save ( ) return storage_obj
create osfstorageguidfile object corresponding to provided osfguidfile object .