docstr: Args:
      instance_id: instance to destroy
  
  Returns:
      True if instance was destroyed successfully
docstr_tok: ["Args",":","instance_id",":","instance","to","destroy","Returns",":","True","if","instance","was","destroyed","successfully"]
code: def destroy_instance(self, instance_id: Union[str, int]) -> bool:
      """
      Args:
          instance_id: instance to destroy
  
      Returns:
          True if instance was destroyed successfully
      """
      resp = self.s.delete(self._url(f"/instances/{instance_id}/"))
      if resp.status_code != 200 or not resp.json()["success"]:
          return False
      self._invalidate_cache()
      return True
  
file_path: dstack/src/dstack/_internal/core/backends/vastai/api_client.py
imports: import shlex
  import threading
  import time
  from typing import List, Optional, Union
  import requests
  from requests.adapters import HTTPAdapter, Retry
  import dstack._internal.server.services.docker
  from dstack._internal.core.errors import NoCapacityError
  from dstack._internal.core.models.configurations import RegistryAuth
label_desc: Use image node_id 4 for calling the VastAIAPIClient obj's underlying member method code with example usage: obj.destroy_instance(instance_id) and returns: True, False