bot.py
def callback_handler(call):
    """If the bot state for a message/call sender is SURVEY1.

       if call.data is 'create survey', switch to SURVEY2 state and send
       the assigned answer."""
    bot.answer_callback_query(call.id)

    if call.data == 'create survey':
        state.save_state(call, state.states['SURVEY2'])
        ans = answers['NAME']
        bot.send_message(call.message.chat.id, ans, parse_mode='HTML')
If the bot state for a message/call sender is SURVEY1.

       if call.data is 'create survey', switch to SURVEY2 state and send
       the assigned answer.
If the bot state for a message/call sender is SURVEY1.
if call.data is 'create survey', switch to SURVEY2 state and send
the assigned answer.
If the bot state for a message / call sender is SURVEY1 . if call . data is ' create survey ' switch to SURVEY2 state and send the assigned answer .
def callback_handler(call):
    bot.answer_callback_query(call.id)
    if call.data == 'create survey':
        state.save_state(call, state.states['SURVEY2'])
        ans = answers['NAME']
        bot.send_message(call.message.chat.id, ans, parse_mode='HTML')
def callback_handler ( call ) : bot . answer_callback_query ( call . id ) if call . data == 'create survey' : state . save_state ( call , state . states [ 'SURVEY2' ] ) ans = answers [ 'NAME' ] bot . send_message ( call . message . chat . id , ans , parse_mode = 'HTML' )
If the bot state for a message/call sender is SURVEY1.
If the bot state for a message / call sender is SURVEY1 .
"""If the bot state for a message/call sender is SURVEY1.

       if call.data is 'create survey', switch to SURVEY2 state and send
       the assigned answer."""
call