def str_recurse(features):
    """
    Helper function to recursively convert "base elements" to strings while leaving datastructures intact
    :param features: item or collection of items to convert to strings
    :return: string representation of features where datastructures are preserved
    """
    if type(features) == tuple:
        return tuple(map(str_recurse, features))
    elif type(features) == list:
        return list(map(str_recurse, features))
    elif type(features) == set:
        return set(map(str_recurse, features))
    elif type(features) == dict:
        return dict(map(lambda kv: (str_recurse(kv[0]), str_recurse(kv[1])), features.items()))
    else:
        return str(features)