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