code: def test_to_nested_json(self):
      tableset = TableSet(self.tables.values(), self.tables.keys())
  
      output = StringIO()
      tableset.to_json(output, nested=True)
      tableset.to_json(".test-tableset/tableset.json", nested=True)
  
      contents1 = json.loads(output.getvalue())
  
      with open(".test-tableset/tableset.json") as f:
          contents2 = json.load(f)
  
      with open("examples/test_tableset.json") as f:
          contents3 = json.load(f)
  
      self.assertEqual(contents1, contents3)
      self.assertEqual(contents2, contents3)
  
      shutil.rmtree(".test-tableset")
  
imports: import json
  import shutil
  from collections import OrderedDict
  from io import StringIO
  from agate import Table, TableSet
  from agate.computations import Formula
  from agate.data_types import Number, Text
  from agate.testcase import AgateTestCase
label_desc: Use image node_id 14 for calling the TestTableSet obj's underlying member method code with example usage: obj.test_to_nested_json() without return types