code: def restart_celery(*args, **kwargs):
      kwargs = kwargs["kwargs"]
      kill_worker_cmd = "pkill -9 celery"
      subprocess.call(shlex.split(kill_worker_cmd))
      start_worker_cmd = (
          "celery -A worker worker --loglevel=%s --logfile=%s --uid=%s --gid=%s"
          % (
              kwargs["loglevel"],
              kwargs["logfile"],
              kwargs["uid"],
              kwargs["gid"],
          )
      )
      subprocess.call(shlex.split(start_worker_cmd))
  
file_path: TimeSide/timeside/server/management/commands/timeside-celery-worker.py
imports: import shlex
  import subprocess
  from optparse import make_option
  from django.core.management.base import BaseCommand
  from django.utils import autoreload
label_desc: Use image node_id 1 for calling a global function with example usage: restart_celery() without return types