def _do_subproject_meson(self, subp_name: str, subdir: str, default_options: T.Dict[(OptionKey, str)], kwargs: kwargs.DoSubproject, ast: T.Optional[mparser.CodeBlockNode]=None, build_def_files: T.Optional[T.List[str]]=None, is_translated: bool=False) -> SubprojectHolder:
    with mlog.nested(subp_name):
        new_build = self.build.copy()
        subi = Interpreter(new_build, self.backend, subp_name, subdir, self.subproject_dir, default_options, ast=ast, is_translated=is_translated, user_defined_options=self.user_defined_options)
        subi.subprojects = self.subprojects
        subi.modules = self.modules
        subi.holder_map = self.holder_map
        subi.bound_holder_map = self.bound_holder_map
        subi.summary = self.summary
        subi.subproject_stack = (self.subproject_stack + [subp_name])
        current_active = self.active_projectname
        current_warnings_counter = mlog.log_warnings_counter
        mlog.log_warnings_counter = 0
        subi.run()
        subi_warnings = mlog.log_warnings_counter
        mlog.log_warnings_counter = current_warnings_counter
        mlog.log('Subproject', mlog.bold(subp_name), 'finished.')
    mlog.log()
    if kwargs['version']:
        pv = subi.project_version
        wanted = kwargs['version']
        if ((pv == 'undefined') or (not mesonlib.version_compare_many(pv, wanted)[0])):
            raise InterpreterException(f'Subproject {subp_name} version is {pv} but {wanted} required.')
    self.active_projectname = current_active
    self.subprojects.update(subi.subprojects)
    self.subprojects[subp_name] = SubprojectHolder(subi, subdir, warnings=subi_warnings)
    if build_def_files:
        self.build_def_files.update(build_def_files)
    self.build_def_files.update(subi.build_def_files)
    self.build.merge(subi.build)
    self.build.subprojects[subp_name] = subi.project_version
    self.coredata.initialized_subprojects.add(subp_name)
    return self.subprojects[subp_name]
def _do_subproject_meson(self, subp_name: str, subdir: str, default_options: T.Dict[(OptionKey, str)], kwargs: kwargs.DoSubproject, ast: T.Optional[mparser.CodeBlockNode]=None, build_def_files: T.Optional[T.List[str]]=None, is_translated: bool=False) -> SubprojectHolder:
    with mlog.nested(subp_name):
        new_build = self.build.copy()
        subi = Interpreter(new_build, self.backend, subp_name, subdir, self.subproject_dir, default_options, ast=ast, is_translated=is_translated, user_defined_options=self.user_defined_options)
        subi.subprojects = self.subprojects
        subi.modules = self.modules
        subi.holder_map = self.holder_map
        subi.bound_holder_map = self.bound_holder_map
        subi.summary = self.summary
        subi.subproject_stack = (self.subproject_stack + [subp_name])
        current_active = self.active_projectname
        current_warnings_counter = mlog.log_warnings_counter
        mlog.log_warnings_counter = 0
        subi.run()
        subi_warnings = mlog.log_warnings_counter
        mlog.log_warnings_counter = current_warnings_counter
        mlog.log('Subproject', mlog.bold(subp_name), 'finished.')
    mlog.log()
    if kwargs['version']:
        pv = subi.project_version
        wanted = kwargs['version']
        if ((pv == 'undefined') or (not mesonlib.version_compare_many(pv, wanted)[0])):
            raise InterpreterException(f'Subproject {subp_name} version is {pv} but {wanted} required.')
    self.active_projectname = current_active
    self.subprojects.update(subi.subprojects)
    self.subprojects[subp_name] = SubprojectHolder(subi, subdir, warnings=subi_warnings)
    if build_def_files:
        self.build_def_files.update(build_def_files)
    self.build_def_files.update(subi.build_def_files)
    self.build.merge(subi.build)
    self.build.subprojects[subp_name] = subi.project_version
    self.coredata.initialized_subprojects.add(subp_name)
    return self.subprojects[subp_name]