class_docstr: This will preoritically query data from cache-service
class_docstr_tok: ["This","will","preoritically","query","data","from","cache-service"]
code: def __next__(self):
      print("compute time = ", time.time() - self.last_fetch_time)
      self.last_fetch_time = time.time()
      if self.data_queue.empty() and not self.thread.is_alive():
          raise StopIteration
      else:
          data = self.data_queue.get(block=True)
          if self.end_signal in data:
              raise StopIteration
          else:
              return data
  
file_path: singa/examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/ml/model_selection/src/dataset_utils/sequence_dataloader.py
imports: import queue
  import threading
  import requests
  import time
  from src.logger import logger
label_desc: Use image node_id 4 for calling the SquenceDataLoader obj's underlying member method code with example usage: obj.__next__() and returns: data