code: def upgrade():
      bind = op.get_bind()
      session = db.Session(bind=bind)
  
      for table_name, model in models.items():
          with op.batch_alter_table(table_name) as batch_op:
              batch_op.add_column(
                  sa.Column(
                      "uuid",
                      UUIDType(binary=True),
                      primary_key=False,
                      default=uuid4,
                  ),
              )
  
          assign_uuids(model, session)
  
          # add uniqueness constraint
          with op.batch_alter_table(table_name) as batch_op:
              # batch mode is required for sqlite
              batch_op.create_unique_constraint(
                  f"uq_{table_name}_uuid", ["uuid"]
              )
  
      # add UUID to Dashboard.position_json
      slice_uuid_map = {
          slc.id: slc.uuid
          for slc in session.query(models["slices"])
          .options(load_only("id", "uuid"))
          .all()
      }
      update_dashboards(session, slice_uuid_map)
  
file_path: superset/superset/migrations/versions/2020-09-28_17-57_b56500de1855_add_uuid_column_to_import_mixin.py
imports: import json
  import os
  from json.decoder import JSONDecodeError
  from uuid import uuid4
  import sqlalchemy
  from alembic import op
  from sqlalchemy.ext.declarative import declarative_base
  from sqlalchemy.orm import load_only
  from sqlalchemy_utils import UUIDType
  from superset import db
  from superset.migrations.shared.utils import assign_uuids
  from superset.utils import core
label_desc: Use image node_id 3 for calling a global function with example usage: upgrade() without return types