def METHOD_NAME():
    def runners_yaml_path(build_dir):
        ret = Path(build_dir) / 'zephyr' / 'runners.yaml'
        if not ret.is_file():
            log.die("could not find build configuration")
        return ret
    def load_runners_yaml(path):
        # Load runners.yaml and convert to Python object.
        try:
            with open(path, 'r') as f:
                content = yaml.safe_load(f.read())
        except Exception as e:
            log.die("runners.yaml file open error: {}".format(e))
        if not content.get('runners'):
            log.wrn("no pre-configured runners in {}; "
                    "this probably won't work".format(path))
        return content
    build_dir = get_build_dir(None)
    domain = load_domains(build_dir).get_default_domain()
    # build dir differs when sysbuild is used
    if domain.name != 'app':
        build_dir = Path(build_dir) / domain.name
        build_dir = get_build_dir(build_dir)
    yaml_path = runners_yaml_path(build_dir)
    runners_yaml = load_runners_yaml(yaml_path)
    return Path(build_dir) / 'zephyr' / runners_yaml['config']['elf_file']