def METHOD_NAME(sys: Mock, urlopen):
    urlopen.side_effect = URLError("")
    InspectorClient("localhost", 9999, False, False, None).do("info")
    message = (
        f"{Colors.RED}Could not connect to inspector at: "
        f"{Colors.YELLOW}http://localhost:9999{Colors.END}\n"
        "Either the application is not running, or it did not start "
        "an inspector instance.\n<urlopen error >\n"
    )
    sys.exit.assert_called_once_with(1)
    sys.stderr.write.assert_called_once_with(message)