code: def get_ngrams_below_threshold(
      args,
      ngrams,
      ngrams_below_threshold,
      dedup_file,
      dedup_key,
      ngrams_freq_sorted,
  ):
      start_time = time.time()
      # get the ngrams frequency
      args.get_ngram_freq_only = True
  
      # Open the large file to process in parallel
      num_workers = args.num_threads
      pool = multiprocessing.Pool(num_workers)
      fin = open(dedup_file, "r", encoding="utf-8")
      free_ngram_abt_partial = partial(
          free_ngram,
          args=args,
          key=dedup_key,
          ngrams=ngrams,
          ngrams_freq_sorted=ngrams_freq_sorted,
      )
      free_ngrams_abt = pool.imap(free_ngram_abt_partial, fin, 500)
  
      counter = 0
      for _, _, _, local_ngram in free_ngrams_abt:
          counter += 1
          if counter % 1000 == 0:
              print(
                  " [compute_stat]> processed {} documents in {:.2f} seconds ...".format(
                      counter, time.time() - start_time
                  ),
                  flush=True,
              )
          for local_key in local_ngram:
              if local_key in ngrams:
                  ngrams[local_key] += 1
          local_ngram = {}
  
      print(
          " Time taken to compute statistics {:.2f} seconds".format(
              time.time() - start_time
          ),
          flush=True,
      )
      pool.close()
      pool.join()
  
      start_time = time.time()
      counter_threshold = 0
      # Get ngram below theadhold
      for local_key, local_val in ngrams.items():
          if ngrams[local_key] < args.key_threshold:
              print(
                  " [threshold] {} {}".format(local_key, local_val),
                  flush=True,
              )
              counter_threshold += 1
              ngrams_below_threshold[local_key] = 1
  
      print(
          " Ngrams below threshold {}".format(counter_threshold),
          flush=True,
      )
      fin.close()
  
imports: import argparse
  from functools import partial
  import json
  import multiprocessing
  import nltk
  import pickle
  import re
  import string
  import sys
  import time
label_desc: Use image node_id 11 for calling a global function with example usage: get_ngrams_below_threshold(args, ngrams, ngrams_below_threshold, dedup_file, dedup_key, ngrams_freq_sorted) without return types