code: def read_input_file(
      example_builder: "BertExampleBuilder",
      input_filename: str,
      infer: bool = False,
  ) -> List["BertExample"]:
      """Reads in Tab Separated Value file and converts to training/inference-ready examples.
  
      Args:
          example_builder: Instance of BertExampleBuilder
          input_filename: Path to the TSV input file.
          infer: Whether test files or not.
  
      Returns:
          examples: List of converted examples(features and Editing Tasks)
      """
  
      if not path.exists(input_filename):
          raise ValueError("Cannot find file: " + input_filename)
      examples = []
      for i, (source, target, semiotic_info) in enumerate(
          yield_sources_and_targets(input_filename)
      ):
          if len(examples) % 1000 == 0:
              logging.info(
                  "{} examples processed.".format(len(examples))
              )
          example = example_builder.build_bert_example(
              source, target, semiotic_info, infer
          )
          if example is None:
              continue
          examples.append(example)
      logging.info(f"Done. {len(examples)} examples converted.")
      return examples
  
imports: import logging
  from collections import OrderedDict
  from os import path
  from typing import Dict, List, Optional, Tuple, Union
  from transformers import PreTrainedTokenizerBase
  from nemo.collections.nlp.data.text_normalization_as_tagging.tagging import EditingTask, Tag
  from nemo.collections.nlp.data.text_normalization_as_tagging.utils import yield_sources_and_targets
label_desc: Use image node_id 1 for calling a global function with example usage: read_input_file(example_builder, input_filename, infer) and returns: examples