def METHOD_NAME(self, data, type):
    """ add required attributes """
    for attr, ancestry in type.attributes():
        name = '_%s' % attr.name
        value = attr.get_default()
        setattr(data, name, value)