def METHOD_NAME(self, terms, variables=None, **kwargs):
    self.set_options(var_options=variables, direct=kwargs)
    missing = self.get_option('on_missing')
    ptype = self.get_option('plugin_type')
    pname = self.get_option('plugin_name')
    show_origin = self.get_option('show_origin')
    if (ptype or pname) and not (ptype and pname):
        raise AnsibleOptionsError('Both plugin_type and plugin_name are required, cannot use one without the other')
    if not isinstance(missing, string_types) or missing not in ['error', 'warn', 'skip']:
        raise AnsibleOptionsError('"on_missing" must be a string and one of "error", "warn" or "skip", not %s' % missing)
    ret = []
    for term in terms:
        if not isinstance(term, string_types):
            raise AnsibleOptionsError('Invalid setting identifier, "%s" is not a string, its a %s' % (term, type(term)))
        result = Sentinel
        origin = None
        try:
            if pname:
                result, origin = _get_plugin_config(pname, ptype, term, variables)
            else:
                result = _get_global_config(term)
        except MissingSetting as e:
            if missing == 'error':
                raise AnsibleLookupError('Unable to find setting %s' % term, orig_exc=e)
            elif missing == 'warn':
                self._display.warning('Skipping, did not find setting %s' % term)
            elif missing == 'skip':
                pass  # this is not needed, but added to have all 3 options stated
        if result is not Sentinel:
            if show_origin:
                ret.append((result, origin))
            else:
                ret.append(result)
    return ret