'Iterate over attributes of a given resource that this references.
Return an iterator over dependent attributes for specified
resource_name in the output\'s value field.'

def dep_attrs(self, resource_name, load_all=False):

    if ((self._all_dep_attrs is None) and load_all):
        attr_map = collections.defaultdict(set)
        for (r, a) in function.all_dep_attrs(self._value):
            attr_map[r].add(a)
        self._all_dep_attrs = attr_map
    if (self._all_dep_attrs is not None):
        return iter(self._all_dep_attrs.get(resource_name, []))
    return function.dep_attrs(self._value, resource_name)
