code: def _request_state(self) -> None:
      if self._state is not None:
          return
      app_url = f"{self._url}/api/v1/state"
      headers = (
          headers_for(self._plugin.get_context())
          if self._plugin
          else {}
      )
  
      response_json = {}
  
      # Sometimes the state URL can return an empty JSON when things are being set-up,
      # so we wait for it to be ready here.
      while response_json == {}:
          sleep(0.5)
          try:
              response = self._session.get(
                  app_url, headers=headers, timeout=1
              )
          except ConnectionError as ex:
              raise AttributeError(
                  "Failed to connect and fetch the app state. Is the app running?"
              ) from ex
  
          self._authorized = response.status_code
          if self._authorized != 200:
              return
  
          response_json = response.json()
  
      logger.debug(f"GET STATE {response} {response_json}")
      self._store_state(response_json)
  
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 7 for calling the AppState obj's underlying member method code with example usage: obj._request_state() without return types