utils.py
def replicate(d: OrderedDict):
    """
    convert a dict with (element, count) into a list
    with each element replicated count many times
    """
    l = []
    for element, count in d.items():
        l.extend([element]*count)
    return l

    convert a dict with (element, count) into a list
    with each element replicated count many times
    
convert a dict with (element, count) into a list
with each element replicated count many times
convert a dict with ( element count ) into a list with each element replicated count many times
def replicate(d: OrderedDict):
    l = []
    for element, count in d.items():
        l.extend([element]*count)
    return l
def replicate ( d : OrderedDict ) : l = [ ] for element , count in d . items ( ) : l . extend ( [ element ] * count ) return l
convert a dict with (element, count) into a list
with each element replicated count many times
convert a dict with ( element count ) into a list with each element replicated count many times
"""
    convert a dict with (element, count) into a list
    with each element replicated count many times
    """
d
OrderedDict