def interpolate_dict_values(to_return, valued, base):
    """Interpolates the values of ``valued`` with values of ``base``.

    :param to_return: A dictionary that will be updated with interpolated
      values.
    :param valued: A dict with values needing interpolation.
    :param base: A dict with the base values to use in interpolation.
    """
    for var, value in valued.items():
        if var in value:
            current = base.get(var, '')
            value = value.replace(var, current)
        to_return[var] = value
    return to_return
