def set_to_list(obj):
    """
    Helper function to turn sets to lists and floats to strings.
    """
    if isinstance(obj, set):
        return list(obj)
    if isinstance(obj, float):
        return str('%.15g' % obj)
    raise TypeError