code: def test_keys(self):
      self.d = dbm.ndbm.open(self.filename, "c")
      self.assertEqual(self.d.keys(), [])
      self.d["a"] = "b"
      self.d[b"bytes"] = b"data"
      self.d["12345678910"] = "019237410982340912840198242"
      self.d.keys()
      self.assertIn("a", self.d)
      self.assertIn(b"a", self.d)
      self.assertEqual(self.d[b"bytes"], b"data")
      # get() and setdefault() work as in the dict interface
      self.assertEqual(self.d.get(b"a"), b"b")
      self.assertIsNone(self.d.get(b"xxx"))
      self.assertEqual(self.d.get(b"xxx", b"foo"), b"foo")
      with self.assertRaises(KeyError):
          self.d["xxx"]
      self.assertEqual(self.d.setdefault(b"xxx", b"foo"), b"foo")
      self.assertEqual(self.d[b"xxx"], b"foo")
      self.d.close()
  
imports: from test.support import import_helper
  from test.support import os_helper
  import os
  import unittest
  import dbm.ndbm
  from dbm.ndbm import error
label_desc: Use image node_id 3 for calling the DbmTestCase obj's underlying member method code with example usage: obj.test_keys() without return types