def METHOD_NAME(tmp_h5py_file, data, expected):
    """Test formatter with h5py attributes"""
    tmp_h5py_file.attrs['attr'] = data
    formatter = TextFormatter()
    result = formatter.toString(tmp_h5py_file.attrs['attr'])
    assert result == expected