code: def stop(self):
          
          if self.status in (TransferState.PAUSED, TransferState.RUNNING):
              self._stop_signal = True
              self.join()
              self._status = TransferState.STOPPED
              if self._callback:
                  return self._callback(self._status)
          else:
              raise SbgError(
                  'Can not stop. Download not in PAUSED or RUNNING state.'
              )
docs: Stops the download.
          :raises SbgError: If download is not in PAUSED or RUNNING state.