<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _handle_option_deprecations(options):
 """Issue appropriate warnings when deprecated options are present in the options dictionary. Removes deprecated option key, value pairs if the options dictionary is found to also have the renamed option."""

    undeprecated_options = _CaseInsensitiveDictionary()
    for key, value in iteritems(options):
        optname = str(key).lower()
        if optname in URI_OPTIONS_DEPRECATION_MAP:
            renamed_key = URI_OPTIONS_DEPRECATION_MAP[optname]
            if renamed_key.lower() in options:
                warnings.warn("Deprecated option '%s' ignored in favor of "
                              "'%s'." % (str(key), renamed_key))
                continue
            warnings.warn("Option '%s' is deprecated, use '%s' instead." % (
                          str(key), renamed_key))
        undeprecated_options[str(key)] = value
    return undeprecated_options