def check_pickle(self, itorg, seq):
        d = pickle.dumps(itorg)
        it = pickle.loads(d)
        # Cannot assert type equality because dict iterators unpickle as list
        # iterators.
        # self.assertEqual(type(itorg), type(it))
        self.assertTrue(isinstance(it, collections.abc.Iterator))
        self.assertEqual(list(it), seq)

        it = pickle.loads(d)
        try:
            next(it)
        except __HOLE__:
            return
        d = pickle.dumps(it)
        it = pickle.loads(d)
        self.assertEqual(list(it), seq[1:])

    # Test basic use of iter() function
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_iter.py/TestCase.check_pickle