code: def testRNNInput(self):
      workspace.ResetWorkspace()
      model = model_helper.ModelHelper(name="rnn_test")
      old_seq_id = data_workers.global_coordinator._fetcher_id_seq
      coordinator = data_workers.init_data_input_workers(
          model,
          ["data1", "label1", "seq_lengths1"],
          dummy_fetcher_rnn,
          32,
          2,
          dont_rebatch=False,
          batch_columns=[1, 1, 0],
      )
      new_seq_id = data_workers.global_coordinator._fetcher_id_seq
      self.assertEqual(new_seq_id, old_seq_id + 2)
  
      coordinator.start()
  
      workspace.RunNetOnce(model.param_init_net)
      workspace.CreateNet(model.net)
  
      while coordinator._coordinators[0]._state._inputs < 100:
          time.sleep(0.01)
  
      # Run a couple of rounds
      workspace.RunNet(model.net.Proto().name)
      workspace.RunNet(model.net.Proto().name)
  
      # Wait for the enqueue thread to get blocked
      time.sleep(0.2)
  
      # We don't dequeue on caffe2 side (as we don't run the net)
      # so the enqueue thread should be blocked.
      # Let's now shutdown and see it succeeds.
      self.assertTrue(coordinator.stop())
  
file_path: pytorch/caffe2/python/data_workers_test.py
imports: import numpy
  import unittest
  import time
  from caffe2.python import workspace, model_helper
  from caffe2.python import timeout_guard
  import caffe2.python.data_workers
label_desc: Use image node_id 2 for calling the DataWorkersTest obj's underlying member method code with example usage: obj.testRNNInput() without return types