def get_availabilities(date):
day_of_week = dateutil.parser.parse(date).weekday()<EOL>availabilities = []<EOL>available_probability = <NUM_LIT><EOL>if day_of_week == <NUM_LIT:0>:<EOL><INDENT>start_hour = <NUM_LIT:10><EOL>while start_hour <= <NUM_LIT:16>:<EOL><INDENT>if random.random() < available_probability:<EOL><INDENT>appointment_type = get_random_int(<NUM_LIT:1>, <NUM_LIT:4>)<EOL>if appointment_type == <NUM_LIT:1>:<EOL><INDENT>availabilities.append('<STR_LIT>'.format(start_hour))<EOL><DEDENT>elif appointment_type == <NUM_LIT:2>:<EOL><INDENT>availabilities.append('<STR_LIT>'.format(start_hour))<EOL><DEDENT>else:<EOL><INDENT>availabilities.append('<STR_LIT>'.format(start_hour))<EOL>availabilities.append('<STR_LIT>'.format(start_hour))<EOL><DEDENT><DEDENT>start_hour += <NUM_LIT:1><EOL><DEDENT><DEDENT>if day_of_week == <NUM_LIT:2> or day_of_week == <NUM_LIT:4>:<EOL><INDENT>availabilities.append('<STR_LIT>')<EOL>availabilities.append('<STR_LIT>')<EOL>availabilities.append('<STR_LIT>')<EOL><DEDENT>return availabilities<EOL>
Helper function which in a full implementation would  feed into a backend API to provide query schedule availability.
The output of this function is an array of 30 minute periods of availability, expressed in ISO-8601 time format.

In order to enable quick demonstration of all possible conversation paths supported in this example, the function
returns a mixture of fixed and randomized results.

On Mondays, availability is randomized; otherwise there is no availability on Tuesday / Thursday and availability at
10:00 - 10:30 and 4:00 - 5:00 on Wednesday / Friday.