def parse_colspecstr(colspecstr, default=unicode):
    if not colspecstr or not colspecstr.strip():
        return
    # parse column::datatype mappings
    for n, colspecstr_col_n in enumerate(colspecstr.split(',')):
        colkeystr = None  # '0'
        coltypefunc = default
        # coltypestr = colspecstr_col_n.strip()
        colspecstrrgx_split = COLSPECSTRRGX.split(
            colspecstr_col_n,
            maxsplit=1)
        if len(colspecstrrgx_split) == 2:
            colkeystr, coltypestr = colspecstrrgx_split
        elif len(colspecstrrgx_split) == 1:
            colkeystr = colspecstrrgx_split[0]
        else:
            raise ValueError(colspecstrrgx_split)

        colkey = parse_field(colkeystr).strip()
        coltypestr = parse_field(coltypestr).strip()
        coltypefunc = typestr_func_map.get(coltypestr, default)
        # raise Exception((colkey, coltypestr, coltypefunc))
        yield (colkey, coltypefunc)
Ask the garbage collector to free all unlocked memory
dataset/ETHPy150Open westurner/pyline/pyline.py/parse_colspecstr--crossover with--dataset/ETHPy150Open arrayfire/arrayfire-python/arrayfire/device.py/device_gc