def book_hotel(intent_request):
location = try_ex(lambda: intent_request['<STR_LIT>']['<STR_LIT>']['<STR_LIT>'])<EOL>checkin_date = try_ex(lambda: intent_request['<STR_LIT>']['<STR_LIT>']['<STR_LIT>'])<EOL>nights = safe_int(try_ex(lambda: intent_request['<STR_LIT>']['<STR_LIT>']['<STR_LIT>']))<EOL>room_type = try_ex(lambda: intent_request['<STR_LIT>']['<STR_LIT>']['<STR_LIT>'])<EOL>session_attributes = intent_request['<STR_LIT>']<EOL>reservation = json.dumps({<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': location,<EOL>'<STR_LIT>': room_type,<EOL>'<STR_LIT>': checkin_date,<EOL>'<STR_LIT>': nights<EOL>})<EOL>session_attributes['<STR_LIT>'] = reservation<EOL>if intent_request['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>validation_result = validate_hotel(intent_request['<STR_LIT>']['<STR_LIT>'])<EOL>if not validation_result['<STR_LIT>']:<EOL><INDENT>slots = intent_request['<STR_LIT>']['<STR_LIT>']<EOL>slots[validation_result['<STR_LIT>']] = None<EOL>return elicit_slot(<EOL>session_attributes,<EOL>intent_request['<STR_LIT>']['<STR_LIT:name>'],<EOL>slots,<EOL>validation_result['<STR_LIT>'],<EOL>validation_result['<STR_LIT:message>']<EOL>)<EOL><DEDENT>if location and checkin_date and nights and room_type:<EOL><INDENT>price = generate_hotel_price(location, nights, room_type)<EOL>session_attributes['<STR_LIT>'] = price<EOL><DEDENT>else:<EOL><INDENT>try_ex(lambda: session_attributes.pop('<STR_LIT>'))<EOL><DEDENT>session_attributes['<STR_LIT>'] = reservation<EOL>return delegate(session_attributes, intent_request['<STR_LIT>']['<STR_LIT>'])<EOL><DEDENT>logger.debug('<STR_LIT>'.format(reservation))<EOL>try_ex(lambda: session_attributes.pop('<STR_LIT>'))<EOL>try_ex(lambda: session_attributes.pop('<STR_LIT>'))<EOL>session_attributes['<STR_LIT>'] = reservation<EOL>return close(<EOL>session_attributes,<EOL>'<STR_LIT>',<EOL>{<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT:content>': '<STR_LIT>'<EOL>'<STR_LIT>'<EOL>}<EOL>)<EOL>
Performs dialog management and fulfillment for booking a hotel.

Beyond fulfillment, the implementation for this intent demonstrates the following:
1) Use of elicitSlot in slot validation and re-prompting
2) Use of sessionAttributes to pass information that can be used to guide conversation