code: def test_pop(self):
      d = self._empty_mapping()
      k, v = next(iter(self.inmapping.items()))
      d[k] = v
      self.assertRaises(KeyError, d.pop, next(iter(self.other.keys())))
  
      self.assertEqual(d.pop(k), v)
      self.assertEqual(len(d), 0)
  
      self.assertRaises(KeyError, d.pop, k)
  
imports: import copy
  import gc
  import random
  import threading
  import unittest
  import torch
  from torch.testing._internal.common_utils import find_library_location, IS_FBCODE, IS_MACOS, IS_SANDCASTLE, IS_WINDOWS, run_tests, TestCase
  from torch.utils.weak import _WeakHashRef, WeakIdKeyDictionary
label_desc: Use image node_id 19 for calling the WeakKeyDictionaryScriptObjectTestCase obj's underlying member method code with example usage: obj.test_pop() without return types