return f
return decorator

@migrate(1, 2)
def upgrade():
    pass

@migrate(2, 1)
def downgrade():
    pass

@migrate(2, 3)
def upgrade():
    pass
print(migrations)
How to create a dict of functions in Python?