code: def test_daemon(mocker):
      mock = mocker.patch("dvc.daemon._spawn")
      daemon.daemon(["updater"])
  
      mock.assert_called()
      args = mock.call_args[0]
      env = args[2]
      assert "PYTHONPATH" in env
  
      file_path = os.path.abspath(inspect.stack()[0][1])
      file_dir = os.path.dirname(file_path)
      test_dir = os.path.dirname(file_dir)
      dvc_dir = os.path.dirname(test_dir)
      assert env["PYTHONPATH"] == dvc_dir
      assert env[daemon.DVC_DAEMON] == "1"
  
imports: import inspect
  import os
  from dvc import daemon
label_desc: Use image node_id 1 for calling a global function with example usage: test_daemon(mocker) without return types