code: def filter_data_by_lang_count(
      data: list[tuple[str, str]], min_obs: int
  ) -> list[tuple[str, str]]:
      """
      Args:
          data
          min_obs
      """
      valid_langs = {
          lang
          for lang, count in collections.Counter(
              lang for _, lang in data
          ).most_common()
          if count >= min_obs
      }
      return [
          text_lang for text_lang in data if text_lang[1] in valid_langs
      ]
  
imports: import argparse
  import collections
  import logging
  import operator
  import pathlib
  import random
  import statistics
  from functools import partial
  from typing import Optional
  import sklearn.model_selection
  from toolz import itertoolz
  import textacy.datasets
  import textacy.io
  import textacy.lang_id._datasets
  import textacy.preprocessing
label_desc: Use image node_id 6 for calling a global function with example usage: filter_data_by_lang_count(data, min_obs) and returns: unknown