code: def test_s3_private_retrieve_tar():
      with mock_s3():
          # Ensure the S3 persistor writes to a filename `model.tar.gz`, whilst
          # passing the fully namespaced path to boto3
          model = "/my/s3/project/model.tar.gz"
          awsPersistor = persistor.AWSPersistor(
              "rasa-test", region_name="foo"
          )
          with patch.object(
              awsPersistor.bucket, "download_fileobj"
          ) as download_fileobj:
              # noinspection PyProtectedMember
              awsPersistor._retrieve_tar(model)
          retrieveArgs = download_fileobj.call_args[0]
          assert retrieveArgs[0] == model
          assert retrieveArgs[1].name == "model.tar.gz"
  
file_path: rasa/tests/nlu/test_persistor.py
imports: from typing import Text
  import pytest
  from unittest.mock import patch
  from moto import mock_s3
  from rasa.nlu import persistor
  from rasa.nlu.persistor import Persistor
label_desc: Use image node_id 2 for calling a global function with example usage: test_s3_private_retrieve_tar() without return types