code: def convert_examples_to_dataset(
      task,
      examples: list,
      tokenizer,
      feat_spec: FeaturizationSpec,
      phase: str,
      verbose=False,
  ):
      """Create ListDataset containing DataRows and metadata.
  
      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.
  
      Returns:
          ListDataset containing DataRows and metadata.
  
      """
      data_rows = tokenize_and_featurize(
          task=task,
          examples=examples,
          tokenizer=tokenizer,
          feat_spec=feat_spec,
          phase=phase,
          verbose=verbose,
      )
      metadata = {"example_id": list(range(len(data_rows)))}
      data = []
      for i, data_row in enumerate(data_rows):
          metadata_row = {k: v[i] for k, v in metadata.items()}
          data.append({"data_row": data_row, "metadata": metadata_row})
      return torch_utils.ListDataset(data)
  
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 4 for calling a global function with example usage: convert_examples_to_dataset(task, examples, tokenizer, feat_spec, phase, verbose) and returns: torch_utils