def METHOD_NAME(self, element: Union[str, JupyterMixin]) -> str:
    # Code blocks are rendered via pygments, which can be styled using themes.
    # For a list of styles see: https://stylishthemes.github.io/Syntax-Themes/pygments/
    # The default uses monokai, which can be hard to read on standard terminal devices.
    # See: https://github.com/someengineering/resoto/issues/652 for problems with monokai.
    to_render = Markdown(element, code_theme="native") if isinstance(element, str) else element
    # get a console with the correct color system
    cs = self.color_system
    system = cs if cs else (ConsoleColorSystem.standard if self.terminal else ConsoleColorSystem.monochrome)
    with ConsoleRenderer.console_pool.with_console(system) as console:
        # explicitly set the width and height here
        console.width = self.width if self.width else 80
        console.height = self.height if self.height else 25
        # capture the output of this console
        with console.capture() as capture:
            console.print(to_render)
        return capture.get()