<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def handle_cancellation(session: CommandSession):
 """ If the input is a string of cancellation word, finish the command session. """


    def control(value):
        if _is_cancellation(value) is True:
            session.finish(render_expression(
                session.bot.config.SESSION_CANCEL_EXPRESSION))
        return value

    return control