Did I find the right examples for you? yes no

All Samples(11)  |  Call(11)  |  Derive(0)  |  Import(0)

src/s/e/seal-0.4.0-rc2/seal/seqal/reducer.py   seal(Download)
    def __process_unmapped_pairs(self, ctx):
        while ctx.nextValue():
            value = ctx.getInputValue()
            pair = protobuf_mapping.unserialize_pair(value)
            self.__output_sink.process(pair)
                    have_pairs = True
                else:
                    pair = protobuf_mapping.unserialize_pair(value)
                    if pair[0] is None or pair[0].is_unmapped():
                        # Sanity check. pair[0] should never be None or unmapped here.

src/s/e/seal-0.4.0-rc2/tests/seal/lib/io/test_protobuf_mapping.py   seal(Download)
    def __pipe_pair_through(self, pair):
        message = io.serialize_pair(pair)
        return io.unserialize_pair(message)
 
    def __compare_pair(self, pair1, pair2):

src/s/e/seal-0.4.0-rc2/tests/seal/seqal/test_mark_duplicates_emitter.py   seal(Download)
            self.assertEqual(1, len(self.ctx.emitted[expected_keys[i]]))
 
        unserialized = proto.unserialize_pair(self.ctx.emitted[expected_keys[0]][0])
        for j in 0,1:
            self.assertEqual(self.pair1[j].tid, unserialized[j].tid)
            self.assertEqual(1, len(self.ctx.emitted[expected_keys[i]]))
 
        unserialized = proto.unserialize_pair(self.ctx.emitted[expected_keys[1]][0])
        for j in 0,1:
            self.assertEqual(self.pair2[j].tid, unserialized[j^1].tid)
        expected_key = test_utils.make_key(self.pair1[1])
        self.assertEqual(1, len(self.ctx.emitted[expected_key]))
        unserialized = proto.unserialize_pair(self.ctx.emitted[expected_key][0])
        self.assertTrue(unserialized[1] is None)
        self.assertEqual(self.pair1[1].tid, unserialized[0].tid)
        expected_key = test_utils.make_key(self.pair1[0])
        self.assertEqual(1, len(self.ctx.emitted[expected_key]))
        unserialized = proto.unserialize_pair(self.ctx.emitted[expected_key][0])
        self.assertTrue(unserialized[1] is None)
        self.assertEqual(self.pair1[0].tid, unserialized[0].tid)
        expected_key = test_utils.make_key(self.pair1[1])
        self.assertEqual(1, len(self.ctx.emitted[expected_key]))
        unserialized = proto.unserialize_pair(self.ctx.emitted[expected_key][0])
        self.assertTrue(unserialized[1] is None)
        self.assertEqual(self.pair1[1].tid, unserialized[0].tid)