code: def pwordfreq(view, fnames):
      """Parallel word frequency counter.
  
      view - An IPython DirectView
      fnames - The filenames containing the split data.
      """
      assert len(fnames) == len(view.targets)
      view.scatter("fname", fnames, flatten=True)
      ar = view.apply(wordfreq, ipp.Reference("fname"))
      freqs_list = ar.get()
      word_set = set()
      for f in freqs_list:
          word_set.update(f.keys())
      freqs = dict(zip(word_set, repeat(0)))
      for f in freqs_list:
          for word, count in f.items():
              freqs[word] += count
      return freqs
  
imports: import os
  import time
  from itertools import repeat
  import requests
  from wordfreq import print_wordfreq, wordfreq
  import ipyparallel
label_desc: Use image node_id 1 for calling a global function with example usage: pwordfreq(view, fnames) and returns: freqs