code: def test_disabled_dir(wandb_init):
      wandb.setup()  # need to do it before we mock tempfile.gettempdir (for service)
      tmp_dir = "/tmp/dir"
      with mock.patch("tempfile.gettempdir", lambda: tmp_dir):
          run = wandb_init(mode="disabled")
      assert run.dir == tmp_dir
  
file_path: wandb/tests/pytest_tests/system_tests/test_core/test_mode_disabled_full.py
imports: import os
  from unittest import mock
  import pytest
  import wandb
label_desc: Use image node_id 3 for calling a global function with example usage: test_disabled_dir(wandb_init) without return types