def test_reduce_with_side_input_ptable(self):
    si = self._pipeline.parallelize({1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6})
    data = self._pipeline.parallelize([1, 2, 3])
    result = data.reduce((lambda x, y, d: (d[x] + d[y])), si)
    result_data = result.get()
    self.assertEqual(6, result_data)
def test_reduce_with_side_input_ptable(self):
    si = self._pipeline.parallelize({1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6})
    data = self._pipeline.parallelize([1, 2, 3])
    result = data.reduce((lambda x, y, d: (d[x] + d[y])), si)
    result_data = result.get()
    self.assertEqual(6, result_data)