def _isinstance(expr, classname):
        """Check whether `expr` is an instance of the class with name
        `classname`

        This is like the builtin `isinstance`, but it take the `classname` a
        string, instead of the class directly. Useful for when we don't want to
        import the class for which we want to check (also, remember that
        printer choose rendering method based on the class name, so this is
        totally ok)
        """
        for cls in type(expr).__mro__:
            if cls.__name__ == classname:
                return True
        return False
Check whether `expr` is an instance of the class with name
        `classname`

        This is like the builtin `isinstance`, but it take the `classname` a
        string, instead of the class directly. Useful for when we don't want to
        import the class for which we want to check (also, remember that
        printer choose rendering method based on the class name, so this is
        totally ok)