def add_descriptor(self, descriptor: Descriptor, resolver: callable=noop_resolver):
    if (not isinstance(descriptor, Descriptor)):
        descriptor = Descriptor.parse(descriptor, resolver)
    append_if_not_none(self.contents, descriptor, 'descriptor')
    return self
def add_descriptor(self, descriptor: Descriptor, resolver: callable=noop_resolver):
    if (not isinstance(descriptor, Descriptor)):
        descriptor = Descriptor.parse(descriptor, resolver)
    append_if_not_none(self.contents, descriptor, 'descriptor')
    return self