class_docstr: Class to keep track of information on a sub-dataset of WMT.
docstr: Injects languages into (potentially) template strings.
code: def _inject_language(self, src, strings):
      """Injects languages into (potentially) template strings."""
      if src not in self.sources:
          raise ValueError(
              "Invalid source for '{0}': {1}".format(self.name, src)
          )
  
      def _format_string(s):
          if "{0}" in s and "{1}" and "{src}" in s:
              return s.format(*sorted([src, self.target]), src=src)
          elif "{0}" in s and "{1}" in s:
              return s.format(*sorted([src, self.target]))
          elif "{src}" in s:
              return s.format(src=src)
          else:
              return s
  
      return [_format_string(s) for s in strings]
  
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 2 for calling the SubDataset obj's underlying member method code with example usage: obj._inject_language(src, strings) and returns: unknown, s, s, s, s