code: def must_be_same(self, klass):
          
          if isinstance(self, klass) or klass is Entry:
              return
          raise TypeError("Tried to lookup %s '%s' as a %s." %\
                (self.__class__.__name__, self.get_internal_path(), klass.__name__))
docs: This node, which already existed, is being looked up as the
          specified klass.  Raise an exception if it isn't.