code: def test_sync_nodes_exclude_same_node(
      ray_start_2_cpus, temp_data_dirs, exclude
  ):
      """Check that excluding files works"""
      tmp_source, tmp_target = temp_data_dirs
  
      assert_file(True, tmp_source, "level0.txt")
      assert_file(True, tmp_source, "subdir/level1.txt")
      assert_file(False, tmp_target, "level0.txt")
      assert_file(False, tmp_target, "subdir/level1.txt")
  
      node_ip = ray.util.get_node_ip_address()
      _sync_dir_on_same_node(
          ip=node_ip,
          source_path=tmp_source,
          target_path=tmp_target,
          exclude=exclude,
      )
  
      assert_file(True, tmp_target, "level0.txt")
      assert_file(False, tmp_target, "subdir/level1.txt")
  
file_path: ray/python/ray/tune/tests/test_util_file_transfer.py
imports: import io
  import tarfile
  import os
  import pytest
  import shutil
  import tempfile
  from ray.exceptions import RayTaskError
  from ray.tune.utils.file_transfer import _sync_dir_between_different_nodes, _sync_dir_on_same_node
  import ray.util
label_desc: Use image node_id 7 for calling a global function with example usage: test_sync_nodes_exclude_same_node(ray_start_2_cpus, temp_data_dirs, exclude) without return types