<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _merge_by_type(lhs, rhs, type_):
 """Helper for '_merge_chunk'."""

    merger = _MERGE_BY_TYPE[type_.code]
    return merger(lhs, rhs, type_)