<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter_by_ids(original_list, ids_to_filter):
 """Filter a list of dicts by IDs using an id key on each dict."""

    if not ids_to_filter:
        return original_list

    return [i for i in original_list if i['id'] in ids_to_filter]