code: def test_move_to_destination_s3(recursive_copy):
      sms = Mock(
          settings=SessionSettings(),
      )
  
      # without trailing slash in prefix
      sagemaker.local.utils.move_to_destination(
          "/tmp/data", "s3://bucket/path", "job", sms
      )
      sms.upload_data.assert_called_with(
          "/tmp/data", "bucket", "path/job"
      )
      recursive_copy.assert_not_called()
  
      # with trailing slash in prefix
      sagemaker.local.utils.move_to_destination(
          "/tmp/data", "s3://bucket/path/", "job", sms
      )
      sms.upload_data.assert_called_with(
          "/tmp/data", "bucket", "path/job"
      )
  
      # without path, with trailing slash
      sagemaker.local.utils.move_to_destination(
          "/tmp/data", "s3://bucket/", "job", sms
      )
      sms.upload_data.assert_called_with("/tmp/data", "bucket", "job")
  
      # without path, without trailing slash
      sagemaker.local.utils.move_to_destination(
          "/tmp/data", "s3://bucket", "job", sms
      )
      sms.upload_data.assert_called_with("/tmp/data", "bucket", "job")
  
imports: from __future__ import absolute_import
  import os
  import errno
  import pytest
  import json
  from mock import patch, Mock, mock_open
  import sagemaker.local.utils
  from sagemaker.session_settings import SessionSettings
label_desc: Use image node_id 3 for calling a global function with example usage: test_move_to_destination_s3(recursive_copy) without return types