async def METHOD_NAME(self) -> None:
    if not sys.stdout.isatty():
        print(
            "Error: mitmproxy's console interface requires a tty. "
            "Please run mitmproxy in an interactive shell environment.",
            file=sys.stderr,
        )
        sys.exit(1)
    detected_encoding = urwid.detected_encoding.lower()
    if os.name != "nt" and detected_encoding and "utf" not in detected_encoding:
        print(
            f"mitmproxy expects a UTF-8 console environment, not {urwid.detected_encoding!r}. "
            f"Set your LANG environment variable to something like en_US.UTF-8.",
            file=sys.stderr,
        )
        # Experimental (04/2022): We just don't exit here and see if/how that affects users.
        # sys.exit(1)
    urwid.set_encoding("utf8")
    signals.call_in.connect(self.sig_call_in)
    self.ui = window.Screen()
    self.ui.set_terminal_properties(256)
    self.set_palette(None)
    self.options.subscribe(
        self.set_palette, ["console_palette", "console_palette_transparent"]
    )
    loop = asyncio.get_running_loop()
    if isinstance(loop, getattr(asyncio, "ProactorEventLoop", tuple())):
        # fix for https://bugs.python.org/issue37373
        loop = AddThreadSelectorEventLoop(loop)  # type: ignore
    self.loop = urwid.MainLoop(
        urwid.SolidFill("x"),
        event_loop=urwid.AsyncioEventLoop(loop=loop),
        screen=self.ui,
        handle_mouse=self.options.console_mouse,
    )
    self.window = window.Window(self)
    self.loop.widget = self.window
    self.window.refresh()
    self.loop.start()
    await super().METHOD_NAME()