def get_sentence(sentence_id=None):
counts = __get_table_limits()<EOL>result = None<EOL>id_ = <NUM_LIT:0><EOL>try:<EOL><INDENT>if isinstance(sentence_id, int):<EOL><INDENT>id_ = sentence_id<EOL><DEDENT>elif isinstance(sentence_id, float):<EOL><INDENT>print("""<STR_LIT>""")<EOL>id_ = round(sentence_id)<EOL><DEDENT>else:<EOL><INDENT>id_ = random.randint(<NUM_LIT:1>, counts['<STR_LIT>'])<EOL><DEDENT><DEDENT>except ValueError:<EOL><INDENT>print("<STR_LIT>")<EOL><DEDENT>if id_ <= counts['<STR_LIT>']:<EOL><INDENT>sentence = __get_sentence(counts, sentence_id=id_)<EOL><DEDENT>else:<EOL><INDENT>print("""<STR_LIT>""".format(str(counts['<STR_LIT>'])))<EOL>id_ = counts['<STR_LIT>']<EOL>sentence = __get_sentence(counts, sentence_id=id_)<EOL><DEDENT>if sentence is not None:<EOL><INDENT>while sentence[<NUM_LIT:0>] == '<STR_LIT:n>':<EOL><INDENT>if id_ is not None:<EOL><INDENT>sentence = __get_sentence(counts, None)<EOL><DEDENT>else:<EOL><INDENT>sentence = __get_sentence(counts, id_)<EOL><DEDENT><DEDENT>if sentence[<NUM_LIT:0>] == '<STR_LIT:y>':<EOL><INDENT>result = __process_sentence(sentence, counts)<EOL><DEDENT>return result<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>
Retrieve a randomly-generated sentence as a unicode string.

    :param sentence_id:

        Allows you to optionally specify an integer representing the sentence_id
        from the database table.  This allows you to retrieve a specific
        sentence each time, albeit with different keywords.