code: def _test_limit_reader_shared(
      self,
      reader_class,
      size,
      expected_read_len,
      expected_read_len_threshold,
      expected_finish,
      num_threads,
      read_delay,
      **limiter_args,
  ):
      ws, session, src_ds, dst_ds = self._test_limit_reader_init_shared(
          size
      )
  
      # Read without limiter
      # WorkspaceType.GLOBAL is required because we are fetching
      # reader.data_finished() after the TaskGroup finishes.
      with TaskGroup(workspace_type=WorkspaceType.GLOBAL) as tg:
          if read_delay > 0:
              reader = reader_class(
                  ReaderWithDelay(src_ds.reader(), read_delay),
                  **limiter_args,
              )
          else:
              reader = reader_class(src_ds.reader(), **limiter_args)
          pipe(reader, dst_ds.writer(), num_runtime_threads=num_threads)
      session.run(tg)
      read_len = len(
          sorted(ws.blobs[str(dst_ds.content().label())].fetch())
      )
  
      # Do a fuzzy match (expected_read_len +/- expected_read_len_threshold)
      # to eliminate flakiness for time-limited tests
      self.assertGreaterEqual(
          read_len, expected_read_len - expected_read_len_threshold
      )
      self.assertLessEqual(
          read_len, expected_read_len + expected_read_len_threshold
      )
      self.assertEqual(
          sorted(ws.blobs[str(dst_ds.content().label())].fetch()),
          list(range(read_len)),
      )
      self.assertEqual(
          ws.blobs[str(reader.data_finished())].fetch(), expected_finish
      )
  
imports: from caffe2.python.dataio import CompositeReader, CompositeReaderBuilder, ReaderBuilder, ReaderWithDelay, ReaderWithLimit, ReaderWithTimeLimit
  from caffe2.python.dataset import Dataset
  from caffe2.python.db_file_reader import DBFileReader
  from caffe2.python.pipeline import pipe
  from caffe2.python.schema import Struct, NewRecord, FeedRecord
  from caffe2.python.session import LocalSession
  from caffe2.python.task import TaskGroup, final_output, WorkspaceType
  from caffe2.python.test_util import TestCase
  from caffe2.python.cached_reader import CachedReader
  from caffe2.python import core, workspace, schema
  from caffe2.python.net_builder import ops
  import numpy
  import numpy.testing
  import os
  import shutil
  import unittest
  import tempfile
label_desc: Use image node_id 3 for calling the TestReaderWithLimit obj's underlying member method code with example usage: obj._test_limit_reader_shared(reader_class, size, expected_read_len, expected_read_len_threshold, expected_finish, num_threads, read_delay) without return types