def display_hook(fn):
    @wraps(fn)
    def wrapped(element):
        global FULL_TRACEBACK
        optstate = StoreOptions.state(element)
        try:
            html = fn(element,
                      max_frames=OutputMagic.options['max_frames'],
                      max_branches = OutputMagic.options['max_branches'])

            # Only want to add to the archive for one display hook...
            disabled_suffixes = ['png_display', 'svg_display']
            if not any(fn.__name__.endswith(suffix) for suffix in disabled_suffixes):
                holoviews.archive.add(element, html=html)
            filename = OutputMagic.options['filename']
            if filename:
                Store.renderers[Store.current_backend].save(element, filename)

            return html
        except SkipRendering as e:
            sys.stderr.write("Rendering process skipped: %s" % str(e))
            return None
        except Exception as e:
            try:
                StoreOptions.state(element, state=optstate)
                frame = inspect.trace()[-1]
                mod = inspect.getmodule(frame[0])
                module = (mod.__name__ if mod else frame[1]).split('.')[0]
                backends = Store.renderers.keys()
                abbreviate =  isinstance(e, BackendError) and module in backends
                if ABBREVIATE_TRACEBACKS and abbreviate:
                    AutoTB = AutoFormattedTB(mode = 'Verbose',color_scheme='Linux')
                    buff = io.StringIO()
                    AutoTB(out=buff)
                    buff.seek(0)
                    FULL_TRACEBACK = buff.read()
                    info = dict(name=type(e).__name__,
                                message=str(e).replace('\n','<br>'))
                    msg ='<i> [Call ipython.show_traceback() for details]</i>'
                    return "<b>{name}</b>{msg}<br>{message}".format(msg=msg, **info)
            except:
                FULL_TRACEBACK = traceback.format_exc()
                msg = ('<i>Error catching exception:</i> %r <br>'
                       'Call ipython.show_traceback() for details')
                return msg % e
            raise e

    return wrapped
dataset/ETHPy150Open ioam/holoviews/holoviews/ipython/display_hooks.py/display_hook/operator `or` -> `and`