def METHOD_NAME(scan_id: str, sudo: bool = False) -> bool:
    """Calls openvas to stop a scan process"""
    cmd = []
    if sudo:
        cmd += ['sudo', '-n']
    cmd += ['openvas', '--scan-stop', scan_id]
    try:
        subprocess.check_call(cmd)
        return True
    except (subprocess.SubprocessError, OSError) as e:
        # the command is not available
        logger.warning(
            'Not possible to stop scan: %s. Reason %s',
            scan_id,
            e,
        )
        return False