code: def test_copy_workdir(expected, ignore_name_patterns):
      workdir_config = CustomFileFilter(
          ignore_name_patterns=ignore_name_patterns
      )
      workdir_config._workdir = WORK_DIR
  
      with _tmpdir() as tmp_dir:
          target_dir = os.path.join(tmp_dir, "workdir")
          copy_workdir(target_dir, workdir_config)
          actual = sorted(
              str(path)
              for path in list(pathlib.Path(target_dir).rglob("*"))
          )
          expected = sorted(
              os.path.join(target_dir, path) for path in expected
          )
          assert actual == sorted(expected)
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/remote_function/test_custom_file_filter.py
imports: from __future__ import absolute_import
  import os
  import pathlib
  import pytest
  from mock import Mock, patch
  from sagemaker.utils import _tmpdir
  from sagemaker.remote_function.custom_file_filter import CustomFileFilter, resolve_custom_file_filter_from_config_file, copy_workdir
  from sagemaker.config import load_sagemaker_config
  from tests.unit import DATA_DIR
label_desc: Use image node_id 3 for calling a global function with example usage: test_copy_workdir(expected, ignore_name_patterns) without return types