def traverse_data(datum, is_numpy=is_numpy, use_numpy=True):
    is_numpy = is_numpy and use_numpy
    if is_numpy and not any(isinstance(el, (list, tuple)) for el in datum):
        return transform_array(np.asarray(datum))
    datum_copy = []
    for item in datum:
        if isinstance(item, (list, tuple)):
            datum_copy.append(traverse_data(item))
        elif isinstance(item, float):
            if np.isnan(item):
                item = 'NaN'
            elif np.isposinf(item):
                item = 'Infinity'
            elif np.isneginf(item):
                item = '-Infinity'
            datum_copy.append(item)
        else:
            datum_copy.append(item)
    return datum_copy
If we have ``bash``, then the command is ``/bin/bash -c <bash>``, whereas
dataset/ETHPy150Open bokeh/bokeh/bokeh/util/serialization.py/traverse_data--crossover with--dataset/ETHPy150Open realestate-com-au/harpoon/harpoon/option_spec/image_objs.py/Image.formatted_command