code: def test_attribute_key_dict(self):
      attrdict = AttributeKeyDict(val1="hello", val2="world")
  
      # Get
      self.assertEqual(attrdict.val1, "hello")
      self.assertEqual(attrdict.val2, "world")
  
      with self.assertRaises(KeyError):
          attrdict.unknown_variable
  
      # Set
      attrdict.new_value = "test"
      self.assertEqual(attrdict.new_value, "test")
  
      # Delete
      del attrdict.val1
      with self.assertRaises(KeyError):
          attrdict.val1
  
      # Storage
      recovered = pickle.loads(pickle.dumps(attrdict))
      self.assertDictEqual(
          dict(recovered), {"new_value": "test", "val2": "world"}
      )
  
file_path: neupy/tests/utils/test_misc.py
imports: from __future__ import unicode_literals
  import random
  import pickle
  from collections import namedtuple
  import numpy
  from neupy.utils.misc import as_tuple, AttributeKeyDict, reproducible
  from base import BaseTestCase
label_desc: Use image node_id 1 for calling the MiscUtilsTestCase obj's underlying member method code with example usage: obj.test_attribute_key_dict() without return types