@lru_cache(maxsize=None)
def get_transitive_link_deps_mapping(self, prefix, environment):
    result = {}
    for i in self.link_targets:
        mapping = i.get_link_deps_mapping(prefix, environment)
        result_tmp = mapping.copy()
        result_tmp.update(result)
        result = result_tmp
    return result
@lru_cache(maxsize=None)
def get_transitive_link_deps_mapping(self, prefix, environment):
    result = {}
    for i in self.link_targets:
        mapping = i.get_link_deps_mapping(prefix, environment)
        result_tmp = mapping.copy()
        result_tmp.update(result)
        result = result_tmp
    return result