def METHOD_NAME(self, terms, variables=None, **kwargs):
    self.set_options(var_options=variables, direct=kwargs)
    paramvals = self.get_options()
    self.cp = configparser.ConfigParser(allow_no_value=paramvals.get('allow_no_value', paramvals.get('allow_none')))
    if paramvals['case_sensitive']:
        self.cp.optionxform = to_native
    ret = []
    for term in terms:
        key = term
        # parameters specified?
        if '=' in term or ' ' in term.strip():
            self._deprecate_inline_kv()
            params = _parse_params(term, paramvals)
            try:
                updated_key = False
                for param in params:
                    if '=' in param:
                        name, value = param.split('=')
                        if name not in paramvals:
                            raise AnsibleLookupError('%s is not a valid option.' % name)
                        paramvals[name] = value
                    elif key == term:
                        # only take first, this format never supported multiple keys inline
                        key = param
                        updated_key = True
            except ValueError as e:
                # bad params passed
                raise AnsibleLookupError("Could not use '%s' from '%s': %s" % (param, params, to_native(e)), orig_exc=e)
            if not updated_key:
                raise AnsibleOptionsError("No key to lookup was provided as first term with in string inline options: %s" % term)
                # only passed options in inline string
        # TODO: look to use cache to avoid redoing this for every term if they use same file
        # Retrieve file path
        path = self.find_file_in_search_path(variables, 'files', paramvals['file'])
        # Create StringIO later used to parse ini
        config = StringIO()
        # Special case for java properties
        if paramvals['type'] == "properties":
            config.write(u'[java_properties]\n')
            paramvals['section'] = 'java_properties'
        # Open file using encoding
        contents, show_data = self._loader._get_file_contents(path)
        contents = to_text(contents, errors='surrogate_or_strict', encoding=paramvals['encoding'])
        config.write(contents)
        config.seek(0, os.SEEK_SET)
        try:
            self.cp.readfp(config)
        except configparser.DuplicateOptionError as doe:
            raise AnsibleLookupError("Duplicate option in '{file}': {error}".format(file=paramvals['file'], error=to_native(doe)))
        try:
            var = self.get_value(key, paramvals['section'], paramvals['default'], paramvals['re'])
        except configparser.NoSectionError:
            raise AnsibleLookupError("No section '{section}' in {file}".format(section=paramvals['section'], file=paramvals['file']))
        if var is not None:
            if isinstance(var, MutableSequence):
                for v in var:
                    ret.append(v)
            else:
                ret.append(var)
    return ret