def isinstance(self, class_or_string):
        """
        Check whether the node is a instance of `class_or_string`.
        Unlinke the standard isinstance builtin, the method accepts either a class or a string.
        In the later case, the string is compared with self.__class__.__name__ (case insensitive).
        """
        if class_or_string is None:
            return False
        import inspect
        if inspect.isclass(class_or_string):
            return isinstance(self, class_or_string)
        else:
            return self.__class__.__name__.lower() == class_or_string.lower()
def isinstance ( self , class_or_string ) : if class_or_string is None : return False import inspect if inspect . isclass ( class_or_string ) : return isinstance ( self , class_or_string ) else : return self . __class__ . __name__ . lower ( ) == class_or_string . lower ( )
Check whether the node is a instance of `class_or_string`.
        Unlinke the standard isinstance builtin, the method accepts either a class or a string.
        In the later case, the string is compared with self.__class__.__name__ (case insensitive).