def _structuredRaggedSparseDataset(self, structure, shapes, dtype):

    def map_fn(shape):
        dense_to_sparse = self._make_dense_to_sparse_fn(False)
        return dense_to_sparse(array_ops.zeros(shape, dtype=dtype))
    if (structure is None):
        return dataset_ops.Dataset.from_tensor_slices(shapes).map(map_fn)
    else:
        return dataset_ops.Dataset.zip(tuple([self._structuredRaggedSparseDataset(substructure, shapes, dtype) for substructure in structure]))
def _structuredRaggedSparseDataset(self, structure, shapes, dtype):

    def map_fn(shape):
        dense_to_sparse = self._make_dense_to_sparse_fn(False)
        return dense_to_sparse(array_ops.zeros(shape, dtype=dtype))
    if (structure is None):
        return dataset_ops.Dataset.from_tensor_slices(shapes).map(map_fn)
    else:
        return dataset_ops.Dataset.zip(tuple([self._structuredRaggedSparseDataset(substructure, shapes, dtype) for substructure in structure]))