def METHOD_NAME(self):
    if self.id is not None:
        raise SlashInternalError('id field of metadata object should be None, is {}'.format(self.id))
    self.id = context.session.id_space.allocate()