<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_attributes(self, attributes, extra=None):
 """Check if attributes given to the constructor can be used to instanciate a valid node."""

        extra = extra or ()
        unknown_keys = set(attributes) - set(self._possible_attributes) - set(extra)
        if unknown_keys:
            logger.warning('%s got unknown attributes: %s' %
                            (self.__class__.__name__, unknown_keys))