<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def migrate_to_blob(context, portal_type, query={}, remove_old_value=True):
 """Migrates FileFields fields to blob ones for a given portal_type. The wueries are done against 'portal_catalog', 'uid_catalog' and 'reference_catalog' :param context: portal root object as context :param query: an expression to filter the catalog by other filters than the portal_type. :param portal_type: The portal type name the migration is migrating *from* """

    migrator = makeMigrator(
        context, portal_type, remove_old_value=remove_old_value)
    walker = BikaCustomQueryWalker(context, migrator, query=query)
    savepoint(optimistic=True)
    walker.go()
    return walker.getOutput()