def METHOD_NAME(
    event_id, count, cursor, valid_length, event_count, amp_factor, plafactors
):
    """
    Fill Post Loss Amplification (PLA) factors dictionary mapped to
    event ID-item ID pair.
    Args:
        event_id (int): current event ID
        count (int): number of remaning amplification IDs associated with
            current event ID
        cursor (int): position in buffer
        valid_length (int): length of buffer in 8-bit chunks
        event_count (numpy.ndarray): array of event ID-count pairs
        amp_factor (numpy.ndarray): array of amplification ID-loss pairs
        plafactors (numba.typed.typeddict.Dict): PLA factors dictionary
    Returns:
        event_id (int): current event ID
        count (int): number of remaining amplification IDs associated with
            current event ID
        plafactors (numba.typed.typeddict.Dict): PLA factors dictionary
    """
    while cursor < valid_length:
        if count == 0:
            event_id = event_count[cursor]['event_id']
            count = event_count[cursor]['count']
            cursor += 1
        else:
            amplification_id = amp_factor[cursor]['amplification_id']
            loss_factor = amp_factor[cursor]['factor']
            plafactors[(event_id, amplification_id)] = loss_factor
            cursor += 1
            count -= 1
    return event_id, count, plafactors