def METHOD_NAME(self):
    """Format and return the next value of the sequence.
    :rtype: str
    """
    cls = self.__class__
    if self.no_gap:
        METHOD_NAME = cls.execute_sql_statement(
            cls.select_sql_statement(cls.number)
            .with_for_update(nowait=True)
            .where(cls.id == self.id)
        ).scalar()
        METHOD_NAME += 1
        cls.execute_sql_statement(
            cls.update_sql_statement()
            .where(cls.id == self.id)
            .values(number=METHOD_NAME)
        )
    else:
        METHOD_NAME = self.anyblok.scalar(SQLASequence(self.seq_name))
    return self.formater.format(code=self.code, seq=METHOD_NAME, id=self.id)