def METHOD_NAME(
    self,
    scan_id: int,
    polling_interval_seconds=60,
    timeout_seconds: int=3600,
) -> model.ScanResponse:
    def scan_finished():
        scan = self.client.get_scan_state(scan_id=scan_id)
        clogger = checkmarx.util.component_logger(artifact_name=self.artifact_name)
        clogger.info(f'polling for {scan_id=}. {scan.status.name=}, {scan.status.details.stage=}'
            f'{scan.status.details.step=}')
        if self.is_scan_finished(scan):
            return scan
        return False
    tm_start = datetime.datetime.now()
    tm_now = tm_start
    result = scan_finished()
    while not result and (tm_now - tm_start).total_seconds() < timeout_seconds:
        # keep polling until result is ready
        time.sleep(polling_interval_seconds)
        result = scan_finished()
        tm_now = datetime.datetime.now()
    if (tm_now - tm_start).total_seconds() >= timeout_seconds:
        scan = self.client.get_scan_state(scan_id=scan_id)
        raise RuntimeError(f'Scan of artifact "{scan.status.name=}", '
            f'{scan_id} aborted after timeout {timeout_seconds}s')
    return result