class_docstr: Source: https://opus.nlpl.eu/TED2020.php
  
  References:
      Reimers, Nils, and Iryna Gurevych. "Making monolingual sentence embeddings multilingual
      using knowledge distillation." arXiv preprint arXiv:2004.09813 (2020).
class_docstr_tok: ["Source",":","https",":","\/\/opus.nlpl.eu\/TED2020.php","References",":","Reimers",",","Nils",",","and","Iryna","Gurevych",".","``","Making","monolingual","sentence","embeddings","multilingual","using","knowledge","distillation",".","''","arXiv","preprint","arXiv:2004.09813","(","2020",")","."]
code: def load(
      self, valid_langs: set[str], min_len: int = 25
  ) -> list[tuple[str, str]]:
      data: list[tuple[str, str]] = []
      for lang in self.langs:
          fpath = self.data_dir / f"{lang}.txt.gz"
          if not fpath.exists():
              print(f"can't find file for lang={lang}; skipping ...")
              continue
  
          file_lang = fpath.name.removesuffix("".join(fpath.suffixes))
          if "_" in file_lang:
              file_lang, _ = file_lang.split("_", maxsplit=1)
          if file_lang not in valid_langs:
              continue
  
          lines = tio.read_text(fpath, lines=True)
          data.extend(
              (line.strip(), file_lang)
              for line in lines
              if len(line) >= min_len
          )
  
      LOGGER.info(
          "loaded Ted2020 dataset: %s rows\n%s ...", len(data), data[:3]
      )
      return data
  
imports: from __future__ import annotations
  import logging
  import operator
  import pathlib
  import random
  import re
  from typing import Dict, Iterable, List, Optional, Set, Tuple
  from cytoolz import itertoolz
  import textacy
  import textacy.utils
  from textacy import io
label_desc: Use image node_id 3 for calling the Ted2020 obj's underlying member method code with example usage: obj.load(valid_langs, min_len) and returns: data