Function code, in which I got the error:
def create_poll(connection, title, owner, options): with connection: with connection.cursor() as cursor: