<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _send_tasks_and_stop_queuing(**kwargs):
 """Sends all delayed Celery tasks and stop queuing new ones for now."""

    log.info('Stopping queueing tasks and sending already queued ones.')
    _stop_queuing_tasks()
    task_queue = _get_task_queue()
    while task_queue:
        task, args, kwargs, extrakw = task_queue.pop(0)
        task.original_apply_async(args=args, kwargs=kwargs, **extrakw)