class_docstr: Attributes:
      name: run name
      ports: ports mapping, if run is attached
      backend: backend type
      status: run status
      hostname: instance hostname
class_docstr_tok: ["Attributes",":","name",":","run","name","ports",":","ports","mapping",",","if","run","is","attached","backend",":","backend","type","status",":","run","status","hostname",":","instance","hostname"]
docstr: Terminate the instance and detach
  
  Args:
      abort: gracefully stop the run if `False`
code: def stop(self, abort: bool = False):
      """
      Terminate the instance and detach
  
      Args:
          abort: gracefully stop the run if `False`
      """
      self._api_client.runs.stop(self._project, [self.name], abort)
      logger.debug(
          "%s run %s", "Aborted" if abort else "Stopped", self.name
      )
      self.detach()
  
imports: import base64
  import queue
  import tempfile
  import threading
  import time
  from abc import ABC
  from copy import copy
  from datetime import datetime
  from pathlib import Path
  from typing import Dict, Iterable, List, Optional, Union
  import requests
  from websocket import WebSocketApp
  import dstack.api
  from dstack._internal.core.errors import ConfigurationError
  from dstack._internal.core.models.backends.base import BackendType
  from dstack._internal.core.models.configurations import AnyRunConfiguration
  from dstack._internal.core.models.profiles import Profile, ProfileResources, ProfileRetryPolicy, SpotPolicy
  from dstack._internal.core.models.repos.base import Repo
  from dstack._internal.core.models.runs import JobSpec
  from dstack._internal.core.models.runs import JobStatus
  from dstack._internal.core.models.runs import Run
  from dstack._internal.core.models.runs import RunPlan, RunSpec
  from dstack._internal.core.services.logs import URLReplacer
  from dstack._internal.core.services.ssh.attach import SSHAttach
  from dstack._internal.core.services.ssh.ports import PortsLock
  from dstack._internal.server.schemas.logs import PollLogsRequest
  from dstack._internal.utils.logging import get_logger
  from dstack._internal.utils.path import PathLike, path_in_dir
  from dstack.api.server import APIClient
label_desc: Use image node_id 11 for calling the Run obj's underlying member method code with example usage: obj.stop(abort) without return types