'Get matching AttributeTemplates for the Numba type.'

def _get_attribute_templates(self, typ):

    if (typ in self._attributes):
        for attrinfo in self._attributes[typ]:
            (yield attrinfo)
    else:
        for cls in type(typ).__mro__:
            if (cls in self._attributes):
                for attrinfo in self._attributes[cls]:
                    (yield attrinfo)
