def _tf_tensors_nonngram(reader, shuffling_queue_capacity, min_after_dequeue):
    """A tensorflow data adapter for non ngrams. Return value is a named tuple with tensorflow tensors supplying
    the data directly into a Tensoflow graph. See `tf_tensor` documentation for input/output arguments meaning."""

    # TODO(yevgeni): implement a mechanism for signaling that we have no more data
    def dequeue_sample_impl(x):
        next_sample = next(reader)
        # Decimal is not supported by TF. int8,16,32,64 scalars are all returned as python native int type
        # (casted to 64 bit by tensorflow). sanitize_field_tf_types will explicitly convert all values
        # to explicit numpy types making it compatible with return values expected by Tensorflow
        return _sanitize_field_tf_types(next_sample)

    # fields_as_list is a list with tensors matching the order of the values in the schema. named-tuple semantics is
    # not preserved across tf.py_func call boundary.
    fields_as_list = tf.py_func(dequeue_sample_impl, [tf.constant(1)], _schema_to_tf_dtypes(reader.schema))

    if shuffling_queue_capacity > 0:
        # Pass py_func output via shuffling queue if requested.
        fields_as_list = _shuffling_queue(shuffling_queue_capacity, min_after_dequeue,
                                          _schema_to_tf_dtypes(reader.schema), fields_as_list)

    # Going via `make_namedtuple_tf` is a little wasteful, since we are converting directly to dict. However, this
    # spares the need to implement a function similar to make_namedtuple_tf that returns dict instead of a named tuple
    fields_as_dict = reader.schema.make_namedtuple_tf(*fields_as_list)._asdict()

    # Force all static shapes to be set in the returned value based on the unischema
    _set_shape(reader.schema, fields_as_dict, reader.batched_output)

    # Make a row tensor into a nice named tuple
    return reader.schema.make_namedtuple_tf(**fields_as_dict)
A tensorflow data adapter for non ngrams. Return value is a named tuple with tensorflow tensors supplying
    the data directly into a Tensoflow graph. See `tf_tensor` documentation for input/output arguments meaning.
petastorm/tf_utils.py