<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run_wagtail_migration_before_core_34(apps, schema_editor):
 """ Migration 34 needs migration 0040 from wagtail core and this Migration will run wagtail migration before molo core migration 34 """

    db_alias = schema_editor.connection.alias
    emit_pre_migrate_signal(verbosity=2, interactive=False, db=db_alias)