def test_set(self):
        """
        Check that a C{set} can contain a circular reference and be serialized
        and unserialized without losing the reference.
        """
        s = set()
        a = SimpleJellyTest(s, None)
        s.add(a)
        res = jelly.unjelly(jelly.jelly(a))
        self.assertIsInstance(res.x, set)
        self.assertEqual(list(res.x), [res])

        Check that a C{set} can contain a circular reference and be serialized
        and unserialized without losing the reference.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/test/test_jelly.py