code: def computeIDF(docCounters):
      """Get Inverse Document Frequency value for each word"""
      n = len(docCounters)
      idfDict = defaultdict(int)
      for doc in docCounters:
          for word, freq in doc.items():
              if freq > 0:
                  idfDict[word] += 1
  
      for word, val in idfDict.items():
          idfDict[word] = math.log10(n / float(val))
      return idfDict
  
imports: import math
  from underthesea.dictionary import Dictionary
  from collections import Counter, defaultdict
  from underthesea.utils import logger
  from datetime import date, timedelta
  import pandas
label_desc: Use image node_id 2 for calling a global function with example usage: computeIDF(docCounters) and returns: idfDict