code: def get_doc_freqs(cnts):
      """
      Return word --> # of docs it appears in.
      """
      binary = (cnts > 0).astype(int)
      freqs = np.array(binary.sum(1)).squeeze()
      return freqs
  
imports: import numpy
  import scipy.sparse
  import math
  from multiprocessing import Pool
  from multiprocessing.util import Finalize
  from functools import partial
  from collections import Counter
  from .None import utils
  from .doc_db import DocDB
  from .None import tokenizers
  import parlai.utils.logging
label_desc: Use image node_id 9 for calling a global function with example usage: get_doc_freqs(cnts) and returns: freqs