code: def test_random(self):
      import random
  
      d = {}  # mirror the database
      for dummy in range(5):
          with contextlib.closing(dumbdbm.open(_fname)) as f:
              for dummy in range(100):
                  k = random.choice("abcdefghijklm")
                  if random.random() < 0.2:
                      if k in d:
                          del d[k]
                          del f[k]
                  else:
                      v = random.choice(
                          (b"a", b"b", b"c")
                      ) * random.randrange(10000)
                      d[k] = v
                      f[k] = v
                      self.assertEqual(f[k], v)
  
          with contextlib.closing(dumbdbm.open(_fname)) as f:
              expected = sorted(
                  (k.encode("latin-1"), v) for k, v in d.items()
              )
              got = sorted(f.items())
              self.assertEqual(expected, got)
  
imports: import contextlib
  import io
  import operator
  import os
  import stat
  import unittest
  import dbm.dumb
  from test import support
  from test.support import os_helper
  from functools import partial
label_desc: Use image node_id 15 for calling the DumbDBMTestCase obj's underlying member method code with example usage: obj.test_random() without return types