code: def test_multi_output(setup):
      sentences = ["word1 word2", "word2 word3", "word3 word2 word1"]
  
      def mapper(s):
          word_to_count = defaultdict(lambda: 0)
          for word in s.split():
              word_to_count[word] += 1
  
          downsides = [defaultdict(lambda: 0), defaultdict(lambda: 0)]
          for word, count in word_to_count.items():
              downsides[mmh3_hash(word) % 2][word] += count
  
          return downsides
  
      def reducer(word_to_count_list):
          d = defaultdict(lambda: 0)
          for word_to_count in word_to_count_list:
              for word, count in word_to_count.items():
                  d[word] += count
  
          return dict(d)
  
      outs = [], []
      for sentence in sentences:
          out1, out2 = spawn(mapper, sentence, n_output=2)
          outs[0].append(out1)
          outs[1].append(out2)
  
      rs = []
      for out in outs:
          r = spawn(reducer, out)
          rs.append(r)
  
      result = dict()
      for wc in ExecutableTuple(rs).to_object():
          result.update(wc)
  
      assert result == {"word1": 2, "word2": 3, "word3": 2}
  
imports: from collections import defaultdict
  import numpy
  import pandas
  import pytest
  from ...None import dataframe
  from ...None import get_context
  from ...None import oscar
  from ...None import tensor
  from ...core import tile
  from ...session import get_default_session
  from ...learn.utils import shuffle
  from ...lib.mmh3 import hash
  from ..None import spawn, ExecutableTuple
label_desc: Use image node_id 4 for calling a global function with example usage: test_multi_output(setup) and returns: downsides, dict