code: def downgrade():
      bind = op.get_bind()
      session = Session(bind=bind)
  
      # Add the old permissions on the migration itself
      add_pvms(session, get_reversed_new_pvms(PVM_MAP))
      migrate_roles(session, get_reversed_pvm_map(PVM_MAP))
      try:
          session.commit()
      except SQLAlchemyError as ex:
          print(
              f"An error occurred while downgrading Logs permissions: {ex}"
          )
          session.rollback()
      pass
  
imports: from alembic import op
  from sqlalchemy.exc import SQLAlchemyError
  from sqlalchemy.orm import Session
  from superset.migrations.shared.security_converge import add_pvms, get_reversed_new_pvms, get_reversed_pvm_map, migrate_roles, Pvm
label_desc: Use image node_id 2 for calling a global function with example usage: downgrade() without return types