code: def _parse_tsv(path, language_pair=None):
      """Generates examples from TSV file."""
      if language_pair is None:
          lang_match = re.match(
              r".*\.([a-z][a-z])-([a-z][a-z])\.tsv", path
          )
          assert lang_match is not None, (
              "Invalid TSV filename: %s" % path
          )
          l1, l2 = lang_match.groups()
      else:
          l1, l2 = language_pair
      with epath.Path(path).open() as f:
          for j, line in enumerate(f):
              cols = line.split("\t")
              if len(cols) != 2:
                  logging.warning(
                      "Skipping line %d in TSV (%s) with %d != 2 columns.",
                      j,
                      path,
                      len(cols),
                  )
                  continue
              s1, s2 = cols
              yield j, {l1: s1.strip(), l2: s2.strip()}
  
imports: import codecs
  import functools
  import gzip
  import itertools
  import os
  import re
  from typing import List
  from xml.etree import ElementTree
  from absl import logging
  from etils import epath
  from tensorflow_datasets.core.utils import tree_utils
  import tensorflow_datasets.public_api
label_desc: Use image node_id 6 for calling a global function with example usage: _parse_tsv(path, language_pair) without return types