code: def _url(self) -> str:
      if self._host is None:
          app_ip = ""
  
          if (
              "LIGHTNING_CLOUD_PROJECT_ID" in os.environ
              and "LIGHTNING_CLOUD_APP_ID" in os.environ
          ):
              client = LightningClient()
              app_instance = client.lightningapp_instance_service_get_lightningapp_instance(
                  os.environ.get("LIGHTNING_CLOUD_PROJECT_ID"),
                  os.environ.get("LIGHTNING_CLOUD_APP_ID"),
              )
              app_ip = app_instance.status.ip_address
  
          # TODO: Don't hard code port 8080 here
          self._host = (
              f"http://{app_ip}:8080" if app_ip else APP_SERVER_HOST
          )
      return (
          f"{self._host}:{self._port}"
          if self._use_localhost
          else self._host
      )
  
imports: import enum
  import json
  import os
  from copy import deepcopy
  from time import sleep
  from typing import Any, Dict, List, Optional, Tuple, Union
  from deepdiff import DeepDiff
  from requests import Session
  from requests.exceptions import ConnectionError
  from lightning.app.core.constants import APP_SERVER_HOST, APP_SERVER_PORT
  from lightning.app.storage.drive import _maybe_create_drive
  from lightning.app.utilities.app_helpers import AppStatePlugin, BaseStatePlugin, Logger
  from lightning.app.utilities.network import LightningClient, _configure_session
label_desc: Use image node_id 2 for calling the AppState obj's underlying member method code with example usage: obj._url() and returns: unknown