code: def run(self, sockets: Optional[List[socket.socket]] = None) -> None:
      self.config.setup_event_loop()
      loop = asyncio.get_event_loop()
      asyncio.ensure_future(self.serve(sockets=sockets))
      if self.has_started_queue:
          asyncio.ensure_future(
              self.check_is_started(self.has_started_queue)
          )
      loop.run_forever()
  
imports: import asyncio
  import contextlib
  import json
  import os
  import queue
  import socket
  import sys
  import traceback
  from copy import deepcopy
  from multiprocessing import Queue
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from threading import Event, Lock, Thread
  from time import sleep
  from typing import Dict, List, Mapping, Optional, Union
  import uvicorn
  from deepdiff import DeepDiff, Delta
  from fastapi import FastAPI, File, HTTPException, Request, Response, UploadFile, WebSocket, status
  from fastapi.middleware.cors import CORSMiddleware
  from fastapi.params import Header
  from fastapi.responses import HTMLResponse, JSONResponse
  from fastapi.staticfiles import StaticFiles
  from fastapi.templating import Jinja2Templates
  from pydantic import BaseModel
  from websockets.exceptions import ConnectionClosed
  from lightning.app.api.http_methods import _HttpMethod
  from lightning.app.api.request_types import _DeltaRequest
  from lightning.app.core.constants import ENABLE_PULLING_STATE_ENDPOINT, ENABLE_PUSHING_STATE_ENDPOINT, ENABLE_STATE_WEBSOCKET, ENABLE_UPLOAD_ENDPOINT, FRONTEND_DIR, get_cloud_queue_type
  from lightning.app.core.flow import LightningFlow
  from lightning.app.core.queues import QueuingSystem
  from lightning.app.core.work import LightningWork
  from lightning.app.storage import Drive
  from lightning.app.utilities.app_helpers import InMemoryStateStore, Logger, StateStore
  from lightning.app.utilities.app_status import AppStatus
  from lightning.app.utilities.cloud import is_running_in_cloud
  from lightning.app.utilities.component import _context
  from lightning.app.utilities.enum import ComponentContext, OpenAPITags
label_desc: Use image node_id 1 for calling the LightningUvicornServer obj's underlying member method code with example usage: obj.run(sockets) without return types