code: def temp_data_dirs(tmp_path):
      tmp_source = tmp_path / "source"
      tmp_target = tmp_path / "target"
      tmp_target.mkdir()
  
      os.makedirs(os.path.join(tmp_source, "subdir", "nested"))
      os.makedirs(
          os.path.join(tmp_source, "subdir_exclude", "something")
      )
  
      files = [
          "level0.txt",
          "level0_exclude.txt",
          "subdir/level1.txt",
          "subdir/level1_exclude.txt",
          "subdir/nested/level2.txt",
          "subdir_nested_level2_exclude.txt",
          "subdir_exclude/something/somewhere.txt",
      ]
  
      for file in files:
          with open(os.path.join(tmp_source, file), "w") as f:
              f.write("Data")
  
      yield str(tmp_source), str(tmp_target)
  
imports: import logging
  import os
  import time
  from typing import List, Optional
  from freezegun import freeze_time
  import pytest
  import ray
  import ray.cloudpickle
  from ray.train._internal.storage import _upload_to_fs_path, _download_from_fs_path, get_fs_and_path, _FilesystemSyncer
  from ray.train._internal.syncer import _BackgroundProcess
  from ray.train.tests.test_new_persistence import _create_mock_custom_fs
label_desc: Use image node_id 5 for calling a global function with example usage: temp_data_dirs(tmp_path) without return types