'Add a task to the Locust\'s task execution queue.
*Arguments*:
* task_callable: Locust task to schedule
* args: Arguments that will be passed to the task callable
* kwargs: Dict of keyword arguments that will be passed to the task callable.
* first: Optional keyword argument. If True, the task will be put first in the queue.'

def schedule_task(self, task_callable, args=None, kwargs=None, first=False):

    task = {'callable': task_callable, 'args': (args or []), 'kwargs': (kwargs or {})}
    if first:
        self._task_queue.insert(0, task)
    else:
        self._task_queue.append(task)
