Using python global variables with celery

I have a celery task that takes a certain argument arg, something like this.

def some_function(arg):

def task_1()

def task_2()

def task_3()

This get called withing some code like this


Now, task_1, task_2 and task_3 need the argument. I could pass the argument to the function but, each time I wanted to add an argument for example (Which is my problem right now), I'd need to re-write the function definition of each task so they can accept this new argument.

How can I define a global variable in a way that I can use this new arg inside each task after the .delay() is called. Will each .delay() call have its own "instance" of the global variable?

In the future the idea is to use some object oriented approach, but a quick "patch" is needed at the moment.