async def get_free_time(date):
free_times = []
work_hours = {'start': 9, 'end': 18}
busy_times = await get_busy_time(date)
for hour in range(work_hours['start'], work_hours['end']):
for minute in [0, 30]:
date_str = "09-03-23"
date = datetime.strptime(date_str, "%d-%m-%y").date()
now = datetime.combine(date, datetime.min.time())
time = datetime(now.year, now.month, now.day, hour, minute, tzinfo=tz)
if time not in busy_times:
free_times.append(time)
return free_times
вроде работает, сделал функцию асинхронной