code: def test_get_ip_without_internet(self, mock_get, monkeypatch):
      mock_get.side_effect = httpx.ConnectError("Connection error")
      monkeypatch.setenv("GRADIO_ANALYTICS_ENABLED", "True")
      Context.ip_address = None
      ip = analytics.get_local_ip_address()
      assert ip == "No internet connection"
  
      monkeypatch.setenv("GRADIO_ANALYTICS_ENABLED", "False")
      Context.ip_address = None
      ip = analytics.get_local_ip_address()
      assert ip == "Analytics disabled"
  
file_path: gradio/test/test_analytics.py
imports: import asyncio
  import ipaddress
  import json
  import os
  import warnings
  from unittest import mock
  import httpx
  import pytest
  from gradio import analytics, wasm_utils
  from gradio.context import Context
label_desc: Use image node_id 2 for calling the TestIPAddress obj's underlying member method code with example usage: obj.test_get_ip_without_internet(mock_get, monkeypatch) without return types