def generate(self):
try:<EOL><INDENT>model = self.schema().model()<EOL><DEDENT>except AttributeError:<EOL><INDENT>return os.urandom(self.__bits).encode('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>while True:<EOL><INDENT>token = os.urandom(self.__bits).encode('<STR_LIT>')<EOL>if model.select(where=orb.Query(self) == token).count() == <NUM_LIT:0>:<EOL><INDENT>return token<EOL><DEDENT><DEDENT><DEDENT>
Generates a new token for this column based on its bit length.  This method
will not ensure uniqueness in the model itself, that should be checked against
the model records in the database first.

:return:    <str>