code: def iter_chunk_tokenize_and_featurize(
      task,
      examples: list,
      tokenizer,
      feat_spec: FeaturizationSpec,
      phase,
      verbose=False,
  ):
      """Generator of DataRows containing tokenized and featurized examples.
  
      Args:
          task (Task): Task object
          examples (list[Example]): list of task Examples.
          tokenizer: TODO  (issue #1188)
          feat_spec (FeaturizationSpec): Tokenization-related metadata.
          phase (str): string identifying the data subset (e.g., train, val or test).
          verbose: If True, display progress bar.
  
      Yields:
          DataRow containing tokenized and featurized examples.
  
      """
      for example in maybe_tqdm(
          examples, desc="Tokenizing", verbose=verbose
      ):
          # TODO: Better solution  (issue #1184)
          if task.TASK_TYPE == TaskTypes.SQUAD_STYLE_QA:
              yield from example.to_feature_list(
                  tokenizer=tokenizer,
                  max_seq_length=feat_spec.max_seq_length,
                  doc_stride=task.doc_stride,
                  max_query_length=task.max_query_length,
                  set_type=phase,
              )
          else:
              yield example.tokenize(tokenizer).featurize(
                  tokenizer, feat_spec
              )
  
file_path: jiant/jiant/proj/main/preprocessing.py
imports: import numpy
  import torch
  import jiant.shared.caching
  import jiant.utils.torch_utils
  from jiant.tasks.core import FeaturizationSpec, TaskTypes
  from jiant.utils.display import maybe_tqdm, maybe_trange
label_desc: Use image node_id 7 for calling a global function with example usage: iter_chunk_tokenize_and_featurize(task, examples, tokenizer, feat_spec, phase, verbose) without return types