code: def test_copier_copies_all_files(
      fs_mock, stat_mock, dir_mock, tmpdir
  ):
      """Test that the Copier calls the copy with the information provided in the request."""
      stat_mock().st_size = 0
      dir_mock.return_value = False
      copy_request_queue = _MockQueue()
      copy_response_queue = _MockQueue()
      work = mock.Mock()
      work.name = MockPatch()
      work._paths = {
          "file": {
              "source": "src",
              "path": "file",
              "hash": "123",
              "destination": "dest",
              "name": "name",
          }
      }
      with mock.patch.dict(
          os.environ,
          {"SHARED_MOUNT_DIRECTORY": str(tmpdir / ".shared")},
      ):
          copier = _Copier(
              work,
              copy_request_queue=copy_request_queue,
              copy_response_queue=copy_response_queue,
          )
          request = _GetRequest(
              source="src",
              path="file",
              hash="123",
              destination="dest",
              name="name",
          )
          copy_request_queue.put(request)
          copier.run_once()
          fs_mock().put.assert_called_once_with(
              "file", tmpdir / ".shared" / "123"
          )
  
file_path: pytorch-lightning/tests/tests_app/storage/test_copier.py
imports: import os
  import pathlib
  from unittest import mock
  from unittest.mock import Mock
  import lightning.app
  import pytest
  from lightning.app.storage.copier import _Copier, _copy_files
  from lightning.app.storage.path import Path
  from lightning.app.storage.requests import _ExistsRequest, _GetRequest
  from lightning.app.testing.helpers import _MockQueue
label_desc: Use image node_id 1 for calling a global function with example usage: test_copier_copies_all_files(fs_mock, stat_mock, dir_mock, tmpdir) without return types