code: def test_listrecursion(self):
      x = []
      x.append(x)
      try:
          json.dumps(x)
      except ValueError:
          pass
      else:
          self.fail("didn't raise ValueError on list recursion")
      x = []
      y = [x]
      x.append(y)
      try:
          json.dumps(x)
      except ValueError:
          pass
      else:
          self.fail(
              "didn't raise ValueError on alternating list recursion"
          )
      y = []
      x = [y, y]
      # ensure that the marker is cleared
      json.dumps(x)
  
file_path: catboost/contrib/python/simplejson/py2/simplejson/tests/test_recursion.py
imports: from unittest import TestCase
  import simplejson
label_desc: Use image node_id 1 for calling the TestRecursion obj's underlying member method code with example usage: obj.test_listrecursion() without return types