<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def command(state, args):
 """Add a priority rule for files."""

    args = parser.parse_args(args[1:])
    row_id = query.files.add_priority_rule(state.db, args.regexp, args.priority)
    del state.file_picker
    print('Added rule {}'.format(row_id))