code: def send_delta(self) -> None:
      app_url = f"{self._url}/api/v1/delta"
      deep_diff = DeepDiff(_LAST_STATE, _STATE, verbose_level=2)
      assert self._plugin is not None
      # TODO: Find how to prevent the infinite loop on refresh without storing the DeepDiff
      if self._plugin.should_update_app(deep_diff):
          data = {"delta": json.loads(deep_diff.to_json())}
          headers = headers_for(self._plugin.get_context())
          try:
              # TODO: Send the delta directly to the REST API.
              response = self._session.post(
                  app_url, json=data, headers=headers
              )
          except ConnectionError as ex:
              raise AttributeError(
                  "Failed to connect and send the app state. Is the app running?"
              ) from ex
  
          if response and response.status_code != 200:
              raise Exception(
                  f"The response from the server was {response.status_code}. Your inputs were rejected."
              )
  
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 6 for calling the AppState obj's underlying member method code with example usage: obj.send_delta() without return types