code: def session_queue(
      tmp_dir, dvc, scm, mocker, session_app, session_worker
  ):
      """Patches experiments celery queue for pytest testing.
  
      Uses session-scoped celery worker.
      """
      queue = dvc.experiments.celery_queue
      queue.celery = session_app
      queue.worker = session_worker
      mocker.patch.object(queue, "_spawn_worker")
      return queue
  
file_path: dvc/tests/unit/repo/experiments/conftest.py
imports: from functools import partial
  import pytest
  from dvc_task.app import FSApp
label_desc: Use image node_id 6 for calling a global function with example usage: session_queue(tmp_dir, dvc, scm, mocker, session_app, session_worker) and returns: queue