def to_marshallable_type(obj):
    if obj is None:
        return None  # make it idempotent for None

    if hasattr(obj, '__marshallable__'):
        return obj.__marshallable__()

    if hasattr(obj, '__getitem__'):
        return obj  # it is indexable it is ok

    return dict(obj.__dict__)
Return the list of elementname's options.
dataset/ETHPy150Open flask-restful/flask-restful/flask_restful/fields.py/to_marshallable_type--crossover with--dataset/ETHPy150Open francelabs/datafari/windows/python/Lib/lib-tk/ttk.py/Style.element_options