'Return resource, attribute name pairs of all attributes referenced.
Return an iterator over the resource name, attribute name tuples of
all attributes that this function references.
The special value heat.engine.attributes.ALL_ATTRIBUTES may be used to
indicate that all attributes of the resource are required.
By default this calls the dep_attrs() method, but subclasses can
override to provide a more efficient implementation.'

def all_dep_attrs(self):

    if (type(self).dep_attrs == Function.dep_attrs):
        return all_dep_attrs(self.args)
    def res_dep_attrs(resource_name):
        return six.moves.zip(itertools.repeat(resource_name), self.dep_attrs(resource_name))
    resource_names = self.stack.enabled_rsrc_names()
    return itertools.chain.from_iterable(six.moves.map(res_dep_attrs, resource_names))
