<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_key(self, key):
 """ Ensure key is either in schema's attributes or already set on self. """

        self.setup_schema()
        if key not in self._attrs and key not in self:
            raise KeyError(key)