def dependency_fallback(self, name, display_name, kwargs):
    required = kwargs.get('required', True)
    if (self.coredata.get_builtin_option('wrap_mode') == WrapMode.nofallback):
        mlog.log('Not looking for a fallback subproject for the dependency', mlog.bold(display_name), 'because:\nUse of fallback dependencies is disabled.')
        if required:
            m = 'Dependency {!r} not found and fallback is disabled'
            raise DependencyException(m.format(display_name))
        return self.notfound_dependency()
    elif (self.coredata.get_builtin_option('wrap_mode') == WrapMode.forcefallback):
        mlog.log('Looking for a fallback subproject for the dependency', mlog.bold(display_name), 'because:\nUse of fallback dependencies is forced.')
    else:
        mlog.log('Looking for a fallback subproject for the dependency', mlog.bold(display_name))
    (dirname, varname) = self.get_subproject_infos(kwargs)
    sp_kwargs = {'default_options': kwargs.get('default_options', []), 'required': required}
    self.do_subproject(dirname, 'meson', sp_kwargs)
    return self.get_subproject_dep(name, display_name, dirname, varname, kwargs)
def dependency_fallback(self, name, display_name, kwargs):
    required = kwargs.get('required', True)
    if (self.coredata.get_builtin_option('wrap_mode') == WrapMode.nofallback):
        mlog.log('Not looking for a fallback subproject for the dependency', mlog.bold(display_name), 'because:\nUse of fallback dependencies is disabled.')
        if required:
            m = 'Dependency {!r} not found and fallback is disabled'
            raise DependencyException(m.format(display_name))
        return self.notfound_dependency()
    elif (self.coredata.get_builtin_option('wrap_mode') == WrapMode.forcefallback):
        mlog.log('Looking for a fallback subproject for the dependency', mlog.bold(display_name), 'because:\nUse of fallback dependencies is forced.')
    else:
        mlog.log('Looking for a fallback subproject for the dependency', mlog.bold(display_name))
    (dirname, varname) = self.get_subproject_infos(kwargs)
    sp_kwargs = {'default_options': kwargs.get('default_options', []), 'required': required}
    self.do_subproject(dirname, 'meson', sp_kwargs)
    return self.get_subproject_dep(name, display_name, dirname, varname, kwargs)