def METHOD_NAME(cfg_path, head):
    cfg = AlembicConfig(cfg_path)
    script = ScriptDirectory.from_config(cfg)
    migrations = [x.revision for x in script.walk_revisions(base="base", head=head)]
    migrations.reverse()
    return migrations