parameters: (tensors)
return_statement: return nest.pack_sequence_as(tensors, [
        sparse_tensor.SparseTensor
        if isinstance(tensor, sparse_tensor.SparseTensor) else ops.Tensor
        for tensor in nest.flatten(tensors)
    ])
docstring: Gets classes for a structure of tensors.
  
    Args:
      tensors: the tensor structure to get classes for.
  
    Returns:
      a structure matching the nested structure of `tensors`, containing
      `tf.sparse.SparseTensor` at positions where `tensors` contains a sparse
      tensor and `tf.Tensor` otherwise.
docstring_summary: Gets classes for a structure of tensors.
docstring_tokens: Gets classes for a structure of tensors .
function: def get_classes(tensors):
    """Gets classes for a structure of tensors.
  
    Args:
      tensors: the tensor structure to get classes for.
  
    Returns:
      a structure matching the nested structure of `tensors`, containing
      `tf.sparse.SparseTensor` at positions where `tensors` contains a sparse
      tensor and `tf.Tensor` otherwise.
    """
    return nest.pack_sequence_as(tensors, [
        sparse_tensor.SparseTensor
        if isinstance(tensor, sparse_tensor.SparseTensor) else ops.Tensor
        for tensor in nest.flatten(tensors)
    ])
function_tokens: def get_classes ( tensors ) : return nest . pack_sequence_as ( tensors , [ sparse_tensor . SparseTensor if isinstance ( tensor , sparse_tensor . SparseTensor ) else ops . Tensor for tensor in nest . flatten ( tensors ) ] )