<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def downgrade(directory, sql, tag, x_arg, revision):
 """Revert to a previous version"""

    _downgrade(directory, revision, sql, tag, x_arg)