def METHOD_NAME(index_settings_key):
    """Returns an index tuning settings dict for the provided index settings
    key. The returned values are rendered from four increasingly specific
    sources using a last-set-wins algorithm. Values are set in order:
    1. Values of ``DEFAULT_TUNING_SETTINGS[DEFAULT]`` from this module.
    2. Values of ``DEFAULT_TUNING_SETTINGS[index_settings_key]`` from this
       module (if present).
    3. Values of ``ES_SETTINGS[DEFAULT]`` from Django settings (if present).
    4. Values of ``ES_SETTINGS[index_settings_key]`` from Django settings (if
       present).
    Any settings whose value is the special ``REMOVE_SETTING`` value will be
    removed from the rendered dictionary unless re-set by a subsequent, more
    specific source.
    An ``InvalidTuningSettingsError`` exception is raised if any index settings
    keys exist which are not a member of ``IndexTuningKey``. For example, if
    ``settings.ES_SETTINGS[DEFAULT] == {"answer": 42}`` then this function will
    raise because ``answer`` is not an ``IndexTuningKey`` member.
    A warning is issued if ``index_settings_key`` is not one of the
    ``IndexSettingsKey`` collection.
    :param index_settings_key: A key in Django ``settings.ES_SETTINGS``
        dictionary to use when rendering the settings.
    :raises: ``InvalidTuningSettingsError``
    """
    if index_settings_key not in IndexSettingsKey:
        msg = (f"Invalid index settings key {index_settings_key!r}, "
               f"expected one of {sorted(IndexSettingsKey)}")
        warnings.warn(msg, UserWarning)
    tuning_settings = {}
    valid_tuning_keys = set(IndexTuningKey)
    for collection in [DEFAULT_TUNING_SETTINGS, settings.ES_SETTINGS or {}]:
        for settings_key in [DEFAULT, index_settings_key]:
            settings_values = collection.get(settings_key, {})
            invalid_settings = set(settings_values) - valid_tuning_keys
            if invalid_settings:
                if collection is DEFAULT_TUNING_SETTINGS:
                    where = f"{__name__}.DEFAULT_TUNING_SETTINGS"
                else:
                    where = "django.conf.settings.ES_SETTINGS"
                msg = (f"Found invalid Elastic index tuning settings for "
                       f"{where}[{settings_key!r}]: {invalid_settings}")
                raise InvalidTuningSettingsError(msg)
            for tunable in valid_tuning_keys:
                try:
                    value = settings_values[tunable]
                except KeyError:
                    continue
                if value is REMOVE_SETTING:
                    del tuning_settings[tunable]
                else:
                    tuning_settings[tunable] = value
    return tuning_settings