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