code: def get_item(self, item_cls, item_type, key):
          
          _state = self.get_state(key)
          try:
              return item_cls(**_state[item_type])
          except TypeError:
              return item_cls().from_json(_state[item_type])
docs: Get a piece of information (a request or a response) from the state
          database.
  
          :param item_cls: The :py:class:`oidcmsg.message.Message` subclass
              that described the item.
          :param item_type: Which request/response that is wanted
          :param key: The key to the information in the state database
          :return: A :py:class:`oidcmsg.message.Message` instance