code: def downgrade():
      logger.info("[RemoveTypeToNativeFilter] Starting downgrade")
      bind = op.get_bind()
      session = db.Session(bind=bind)
  
      for dashboard in session.query(Dashboard).all():
          logger.info(
              "[RemoveTypeToNativeFilter] Updating Dashboard<pk:%s>",
              dashboard.id,
          )
          if not dashboard.json_metadata:
              logger.info(
                  "[RemoveTypeToNativeFilter] Skipping Dashboard<pk:%s> json_metadata is %s",
                  dashboard.id,
                  dashboard.json_metadata,
              )
              continue
          try:
              json_meta = json.loads(dashboard.json_metadata)
          except:
              logger.exception(
                  "[RemoveTypeToNativeFilter] Error loading json_metadata"
              )
              continue
  
          if "native_filter_configuration" not in json_meta:
              logger.info(
                  "[RemoveTypeToNativeFilter] Skipping Dashboard<pk:%s>."
                  " native_filter_configuration not found.",
                  dashboard.id,
              )
              continue
          for native_filter in json_meta["native_filter_configuration"]:
              native_filter.pop("type", None)
          dashboard.json_metadata = json.dumps(json_meta)
      session.commit()
      session.close()
      logger.info("[RemoveTypeToNativeFilter] Done!")
  
file_path: superset/superset/migrations/versions/2021-08-31_11-37_021b81fe4fbb_add_type_to_native_filter_configuration.py
imports: import json
  import logging
  import sqlalchemy
  from alembic import op
  from sqlalchemy.ext.declarative import declarative_base
  from superset import db
label_desc: Use image node_id 2 for calling a global function with example usage: downgrade() without return types