code: def test_dir_on_import():
      """Ensure that `import wandb` does not create a local storage directory."""
      default_path = os.path.join(os.getcwd(), "wandb")
      custom_env_path = os.path.join(os.getcwd(), "env_custom")
  
      # Test for the base case
      _remove_dir_if_exists(default_path)
      reload_fn(wandb)
      assert not os.path.isdir(
          default_path
      ), f"Unexpected directory at {default_path}"
  
      # test for the case that the env variable is set
      with mock.patch.dict(os.environ, {"WANDB_DIR": custom_env_path}):
          _remove_dir_if_exists(default_path)
          reload_fn(wandb)
          assert not os.path.isdir(
              default_path
          ), "Unexpected directory at {}".format(default_path)
          assert not os.path.isdir(
              custom_env_path
          ), f"Unexpected directory at {custom_env_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 4 for calling a global function with example usage: test_dir_on_import() without return types