def naked_twins_on_peers(values, box, box_peers):
    """
    Solves naked twins per one type of peers of a box
    :param values: grid values
    :param box: box
    :param box_peers: peers of a single type of a box
    :return: grid values with adjusted naked twins
    """
    value = values[box]

    twins = set()
    twins.add(box)

    # find all twins related to current box
    for box_peer in box_peers:
        if len(values[box_peer]) != 2:
            continue
        if values[box_peer] == value:
            twins.add(box_peer)

    # at least two twins
    if len(twins) < 2:
        return values

    for box_peer in box_peers:
        if box_peer in twins:
            continue
        # replace occurrence of all numbers from naked twins in this box
        for number in value:
            # assign_value(values, box_peer, values[box_peer].replace(number, ''))
            values[box_peer] = values[box_peer].replace(number, '')
    return values