<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_result(res, json_file):
 """Save result to file."""

    with open(json_file, 'wb') as f:
        json.dump(res, f, sort_keys=True)