code: def filter_by_lang(args):
      (
          src_edges,
          tgt_edges,
          input_src,
          input_tgt,
          filtered_dir_src,
          filtered_dir_tgt,
          removed_dir_src,
          removed_dir_tgt,
          source_lang,
          target_lang,
          fasttext_model,
          rank,
      ) = args
      logging.debug(f"filter by lang input_tgt: {input_tgt}")
      if input_tgt is None:
          if tgt_edges is not None:
              warnings.warn(
                  "If input target is not provided `tgt_edges` argument is expected to be `None`"
              )
          filter_singles(
              src_edges,
              input_src,
              filtered_dir_src,
              removed_dir_src,
              source_lang,
              fasttext_model,
              rank,
          )
      else:
          filter_pairs(
              src_edges,
              tgt_edges,
              input_src,
              input_tgt,
              filtered_dir_src,
              filtered_dir_tgt,
              removed_dir_src,
              removed_dir_tgt,
              source_lang,
              target_lang,
              fasttext_model,
              rank,
          )
  
imports: import argparse
  import logging
  import multiprocessing
  import re
  import shutil
  import warnings
  from pathlib import Path
  from time import sleep
  import fasttext
  from tqdm import tqdm
label_desc: Use image node_id 7 for calling a global function with example usage: filter_by_lang(args) without return types