code: def get_iterator(args):
      with open(args.data, "r") as fp:
          lines = fp.read().split("\n")
          files = [line.rstrip() for line in lines if len(line) > 0]
  
          num = len(files)
  
          def iterate():
              for scp_line in files:
                  fname, feats_path = scp_line.split()
                  feats = np.load(feats_path)
                  yield feats, fname
  
          return iterate, num
  
file_path: espnet/egs2/bibletts/tts1/pyscripts/feats/feats_apply_cluster_cuml.py
imports: import argparse
  import logging
  import os
  import os.path
  import pickle
  import sys
  import numpy
  import tqdm
  from cuml.cluster import KMeans
label_desc: Use image node_id 2 for calling a global function with example usage: get_iterator(args) and returns: iterate,  num