async def METHOD_NAME(
    client: TestClient,
    storage_s3_client: StorageS3Client,
    storage_s3_bucket: S3BucketName,
    user_id: UserID,
    location_id: LocationID,
) -> Callable[..., Awaitable[None]]:
    async def _dir_remover(directory_file_upload: FileUploadSchema) -> None:
        assert directory_file_upload.urls[0].path
        directory_file_id = directory_file_upload.urls[0].path.strip("/")
        assert client.app
        delete_url = (
            client.app.router["delete_file"]
            .url_for(
                location_id=f"{location_id}",
                file_id=urllib.parse.quote(directory_file_id, safe=""),
            )
            .with_query(user_id=user_id)
        )
        response = await client.delete(f"{delete_url}")
        await assert_status(response, web.HTTPNoContent)
        # NOTE: ensures no more files are left in the directory,
        # even if one file is left this will detect it
        files = await storage_s3_client.list_files(
            bucket=storage_s3_bucket, prefix=directory_file_id
        )
        assert len(files) == 0
    return _dir_remover