def METHOD_NAME(alembic_config, config, migration, homedir):
    """
    Upgrade to the target migration, load data, then downgrade in order to test that the downgrade
    is successful when there is data.
    """
    upgrade(alembic_config, migration)
    mod_name = "tests.migrations.test_{}".format(migration)
    mod = __import__(mod_name, fromlist=["DowngradeTester"])
    session = make_session_maker(homedir)
    downgrade_tester = mod.DowngradeTester(homedir, session)
    downgrade_tester.load_data()
    downgrade(alembic_config, "-1")
    downgrade_tester.check_downgrade()