code: def index_iter(data):
      """return indexing iter"""
      if isinstance(data, list):
          return range(len(data))
      elif isinstance(data, dict):
          return data.keys()
  
file_path: PGL/pgl/utils/mp_reader.py
imports: import logging
  import multiprocessing
  import copy
  import numpy
  import time
  from multiprocessing import Queue
  import threading
  from collections import namedtuple
label_desc: Use image node_id 2 for calling a global function with example usage: index_iter(data) and returns: range, data