def set_name_record(font, record_id, value, addIfMissing=''):
    records_to_drop = set()
    names = font['name'].names
    added = []
    for record_number, record in enumerate(names):
        name_ids = (record.platformID, record.platEncID, record.langID)
        if name_ids not in [(3, 1, 0x409), (1, 0, 0)]:
            continue
        if record.nameID == record_id:
            if value is None:
                records_to_drop.add(record_number)
            else:
                if name_ids == (1, 0, 0):
                    record.string = value.encode('mac-roman')
                    added.append('mac')
                else:  # (3, 1, 0x409)
                    record.string = value.encode('UTF-16BE')
                    added.append('win')

    if addIfMissing and value:
        for key in addIfMissing.split(','):
            if key in added:
                continue

            if key == 'win':
                nr = NameRecord()
                nr.nameID = record_id
                nr.platformID = 3
                nr.platEncID = 1
                nr.langID = 0x409
                nr.string = value.encode('UTF-16BE')
            elif key == 'mac':
                nr = NameRecord()
                nr.nameID = record_id
                nr.platformID = 1
                nr.platEncID = 0
                nr.langID = 0
                nr.string = value.encode('mac-roman')
            else:
                nr = None

            if nr:
                names.append(nr)

    if records_to_drop:
        font['name'].names = [
            record for record_number, record in enumerate(names)
            if record_number not in records_to_drop]
process the generators of ``poly``, returning the set of generators that
dataset/ETHPy150Open googlei18n/nototools/nototools/font_data.py/set_name_record--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/solvers/bivariate.py/_filtered_gens