def migrate_category(node):
 if (node.category not in settings.NODE_CATEGORY_MAP.keys()):
  node.category = MIGRATE_MAP.get(node.category, 'other')
  return True
 return False

def migrate_category ( node ) : if ( node . category not in settings . NODE_CATEGORY_MAP . keys ( ) ) : node . category = MIGRATE_MAP . get ( node . category , 'other' ) return True return False
migrate legacy .