'Interpolates (subst) values in extend_env.
Mostly for path manipulation'

def interpolate_extend_env(self, env, extend_env):

    new_env = {}
    for (key, val) in list(extend_env.items()):
        new_env[key] = str(val).format(**env)
    return new_env
