code: def downgrade():
      bind = op.get_bind()
      insp = engine.reflection.Inspector.from_engine(bind)
  
      # Remove the missing uniqueness constraint from the sql_metrics table.
      with op.batch_alter_table(
          "sql_metrics", naming_convention=conv
      ) as batch_op:
          batch_op.drop_constraint(
              generic_find_uq_constraint_name(
                  "sql_metrics", {"metric_name", "table_id"}, insp
              )
              or "uq_sql_metrics_table_id",
              type_="unique",
          )
  
      # Restore the size of the sql_metrics.metric_name column and forego that it
      # be non-nullable.
      with op.batch_alter_table("sql_metrics") as batch_op:
          batch_op.alter_column(
              "metric_name",
              existing_type=String(255),
              nullable=True,
              type_=String(512),
          )
  
      # Forego that the sql_metrics.expression column be non-nullable.
      with op.batch_alter_table("sql_metrics") as batch_op:
          batch_op.alter_column(
              "expression", existing_type=Text, nullable=True
          )
  
      # Forego that the metrics.metric_name column be non-nullable.
      with op.batch_alter_table("metrics") as batch_op:
          batch_op.alter_column(
              "metric_name", existing_type=String(255), nullable=True
          )
  
      # Forego that the metrics.json column be non-nullable.
      with op.batch_alter_table("metrics") as batch_op:
          batch_op.alter_column(
              "json", existing_type=Text, nullable=True
          )
  
file_path: superset/superset/migrations/versions/2018-07-20_15-57_e9df189e5c7e_update_base_metrics.py
imports: from alembic import op
  from sqlalchemy import Column, engine, Integer, String, Text
  from sqlalchemy.ext.declarative import declarative_base
  from superset import db
  from superset.utils.core import generic_find_uq_constraint_name
label_desc: Use image node_id 2 for calling a global function with example usage: downgrade() without return types