code: def testDictDict(self):
      g = Graph([(0, 1), (0, 2), (1, 2)])
  
      # Check with vertex ids, no edge attrs
      self.assertEqual(
          g.to_dict_dict(),
          {0: {1: {}, 2: {}}, 1: {2: {}}},
      )
  
      # With vertex ids, edge attrs
      g.es["name"] = ["first_edge", "second", None]
      # Check with vertex ids, incomplete edge attrs
      self.assertEqual(
          g.to_dict_dict(),
          {
              0: {1: {"name": "first_edge"}, 2: {"name": "second"}},
              1: {2: {"name": None}},
          },
      )
      self.assertEqual(
          g.to_dict_dict(skip_none=True),
          {
              0: {1: {"name": "first_edge"}, 2: {"name": "second"}},
              1: {2: {}},
          },
      )
  
      # With vertex names
      g.vs["name"] = ["apple", "pear", "peach"]
      self.assertEqual(
          g.to_dict_dict(use_vids=False),
          {
              "apple": {
                  "pear": {"name": "first_edge"},
                  "peach": {"name": "second"},
              },
              "pear": {"peach": {"name": None}},
          },
      )
      self.assertEqual(
          g.to_dict_dict(use_vids=False, skip_none=True),
          {
              "apple": {
                  "pear": {"name": "first_edge"},
                  "peach": {"name": "second"},
              },
              "pear": {"peach": {}},
          },
      )
  
imports: import gzip
  import io
  import unittest
  import warnings
  from igraph import Graph, InternalError
  from .utils import temporary_file
label_desc: Use image node_id 15 for calling the ForeignTests obj's underlying member method code with example usage: obj.testDictDict() without return types