human
Solve the following python programming problem given the following code:
def batch_sender(self, my_queue, stream_name, send_interval, max_batch_size, max_batch_count) : 
    msg = None 
    def size(msg) : 
        return (len (msg ['message']) + 26) 
while (msg != self.END) : 
        cur_batch = ([] if (msg is None) else [msg]) 
        cur_batch_size = sum ((size (msg) for msg in cur_batch)) 
        cur_batch_msg_count = len (cur_batch) 
        cur_batch_deadline = (time.time () + send_interval) 
        while True : 
            try : 
                msg = my_queue.get (block = True, timeout = max (0, (cur_batch_deadline - time.time ()))) 
except Queue.Empty : 
                msg = None 
if ((msg is None) or (msg == self.END) or ((cur_batch_size + size (msg)) > max_batch_size) or (send_interval >= max_batch_count) or (time.time () >= cur_batch_deadline)) : 
                self._submit_batch (cur_batch, stream_name) 
                if (msg is not None) : 
                    my_queue.task_done () 
break 
else : 
                if msg : 
                    cur_batch_size += size (msg) 
                    cur_batch_msg_count += 1 
                    cur_batch.append (msg) 
                    my_queue.task_done () 

    
    

    Fix the buggy line: if ((msg is None) or (msg == self.END) or ((cur_batch_size + size (msg)) > max_batch_size) or (send_interval >= max_batch_count) or (time.time () >= cur_batch_deadline)) :
assistant
#Here is Python program to fix the buggy line: if ((msg is None) or (msg == self.

if ((msg is None) or (msg == self.END) or ((cur_batch_size + size (msg)) > max_batch_size) or (cur_batch_msg_count >= max_batch_count) or (time.time () >= cur_batch_deadline)) :