code: def test_warn(self):
      s = State()
  
      key1 = torchbearer.state_key("test_a")
      key2 = torchbearer.state_key("test_b")
  
      with warnings.catch_warnings(record=True) as w:
          warnings.simplefilter("always")
  
          s[key1] = "key_1"
          s[key2] = "key_2"
          s["bad_key"] = "bad_key"
          self.assertTrue(len(w) == 1)
          self.assertTrue(
              "State was accessed with a string" in str(w[-1].message)
          )
  
imports: import unittest
  import warnings
  import torchbearer
  from torchbearer.state import State
label_desc: Use image node_id 5 for calling the TestState obj's underlying member method code with example usage: obj.test_warn() without return types