code: def store_item(self, item, item_type, key):
          
          try:
              _state = self.get_state(key)
          except KeyError:
              _state = State()
  
          try:
              _state[item_type] = item.to_json()
          except AttributeError:
              _state[item_type] = item
  
          self.state_db.set(key, _state.to_json())
docs: Store a service response.
  
          :param item: The item as a :py:class:`oidcmsg.message.Message`
              subclass instance or a JSON document.
          :param item_type: The type of request or response
          :param key: The key under which the information should be stored in
              the state database