code: def upgrade():
      bind = op.get_bind()
      session = db.Session(bind=bind)
  
      for slc in (
          session.query(Slice)
          .filter(Slice.viz_type == "mixed_timeseries")
          .all()
      ):
          try:
              params = json.loads(slc.params)
  
              adhoc_filters_b = params.get("adhoc_filters_b", None)
              if not adhoc_filters_b:
                  params["adhoc_filters_b"] = []
                  slc.params = json.dumps(params, sort_keys=True)
          except Exception:
              pass
  
      session.commit()
      session.close()
  
file_path: superset/superset/migrations/versions/2022-03-02_16-41_7293b0ca7944_change_adhoc_filter_b_from_none_to_.py
imports: import json
  from alembic import op
  from sqlalchemy import Column, Integer, String, Text
  from sqlalchemy.ext.declarative import declarative_base
  from superset import db
label_desc: Use image node_id 1 for calling a global function with example usage: upgrade() without return types