code: def test_dir_on_init(wandb_init):
      """Ensure that `wandb.init()` creates the proper directory and nothing else."""
      default_path = os.path.join(os.getcwd(), "wandb")
  
      # Clear env if set
      names_to_remove = {env.DIR}
      modified_environ = {
          k: v
          for k, v in os.environ.items()
          if k not in names_to_remove
      }
      with mock.patch.dict("os.environ", modified_environ, clear=True):
          # Test for the base case
          reload_fn(wandb)
          _remove_dir_if_exists(default_path)
          run = wandb_init()
          run.finish()
          assert os.path.isdir(
              default_path
          ), f"Expected directory at {default_path}"
  
file_path: wandb/tests/pytest_tests/system_tests/test_core/test_wandb_integration.py
imports: import importlib
  import os
  import shutil
  import time
  from unittest import mock
  import pytest
  import wandb
  import wandb.env
label_desc: Use image node_id 5 for calling a global function with example usage: test_dir_on_init(wandb_init) without return types