<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_state(self, key):
 """ Get the state connected to a given key. :param key: Key into the state database :return: A :py:class:´oidcservice.state_interface.State` instance """

        _data = self.state_db.get(key)
        if not _data:
            raise KeyError(key)
        else:
            return State().from_json(_data)