code: def upgrade():
      bind = op.get_bind()
  
      # Ensure `slice.params` and `slice.query_context`` in MySQL is MEDIUMTEXT
      # before migration, as the migration will save a duplicate form_data backup
      # which may significantly increase the size of these fields.
      if isinstance(bind.dialect, MySQLDialect):
          # If the columns are already MEDIUMTEXT, this is a no-op
          op.execute("ALTER TABLE slices MODIFY params MEDIUMTEXT")
          op.execute(
              "ALTER TABLE slices MODIFY query_context MEDIUMTEXT"
          )
  
      session = db.Session(bind=bind)
      MigrateTreeMap.upgrade(session)
  
imports: from alembic import op
  from sqlalchemy.dialects.mysql.base import MySQLDialect
  from superset import db
  from superset.migrations.shared.migrate_viz import MigrateTreeMap
label_desc: Use image node_id 1 for calling a global function with example usage: upgrade() without return types