def METHOD_NAME(
    config: Config, engine: Engine, script: ScriptDirectory, revision_type="current"
) -> tuple:
    """
    Helper to get revision id
    """
    with engine.connect() as conn:
        with EnvironmentContext(config, script) as env_context:
            env_context.configure(conn, version_table="migrate_version")
            if revision_type == "head":
                revision = env_context.get_head_revisions()
            else:
                migration_context = env_context.get_context()
                revision = migration_context.get_current_heads()
    return revision