code: def _read_from_tf_tensors(
      synthetic_dataset,
      count,
      shuffling_queue_capacity,
      min_after_dequeue,
      ngram,
  ):
      """Used by several test cases. Reads a 'count' rows using reader.
  
      The reader is configured without row-group shuffling and guarantees deterministic order of rows up to the
      results queue TF shuffling which is controlled by 'shuffling_queue_capacity', 'min_after_dequeue' arguments.
  
      The function returns a tuple with: (actual data read from the dataset, a TF tensor returned by the reader)
      """
  
      schema_fields = NON_NULLABLE_FIELDS if ngram is None else ngram
  
      with make_reader(
          schema_fields=schema_fields,
          dataset_url=synthetic_dataset.url,
          reader_pool_type="dummy",
          shuffle_row_groups=False,
      ) as reader:
          row_tensors = tf_tensors(
              reader,
              shuffling_queue_capacity=shuffling_queue_capacity,
              min_after_dequeue=min_after_dequeue,
          )
          with _tf_session() as sess:
              rows_data = [sess.run(row_tensors) for _ in range(count)]
  
      return rows_data, row_tensors
  
imports: from __future__ import division
  import datetime
  from calendar import timegm
  from collections import namedtuple
  from contextlib import contextmanager
  from decimal import Decimal
  from functools import wraps
  import inspect
  import numpy
  from packaging import version
  import pytest
  import tensorflow.compat.v1
  from unittest import mock
  from petastorm import make_reader, make_batch_reader, TransformSpec
  from petastorm.ngram import NGram
  from petastorm.tests.test_common import TestSchema
  from petastorm.tf_utils import _sanitize_field_tf_types, _numpy_to_tf_dtypes, _schema_to_tf_dtypes, tf_tensors, _ngrams_generator, _unflatten_and_set_shape
  from petastorm.unischema import Unischema, UnischemaField
label_desc: Use image node_id 8 for calling a global function with example usage: _read_from_tf_tensors(synthetic_dataset, count, shuffling_queue_capacity, min_after_dequeue, ngram) and returns: rows_data,  row_tensors