@classmethod
def get_for(cls, model, type_names=None):
    result = []
    try:
        for (type_name, attributes) in cls.__registry[model].iteritems():
            if ((not type_names) or (type_name in type_names)):
                result.extend(attributes)
        return result
    except IndexError:
        if (model.__class__ == models.base.ModelBase):
            raise
        return cls.get_for[type(model)]
@classmethod
def get_for(cls, model, type_names=None):
    result = []
    try:
        for (type_name, attributes) in cls.__registry[model].iteritems():
            if ((not type_names) or (type_name in type_names)):
                result.extend(attributes)
        return result
    except IndexError:
        if (model.__class__ == models.base.ModelBase):
            raise
        return cls.get_for[type(model)]