code: def test_local_session_download_with_custom_s3_endpoint_url(
      sagemaker_session_custom_endpoint,
  ):
      DOWNLOAD_DATA_TESTS_FILES_DIR = os.path.join(
          DATA_DIR, "download_data_tests"
      )
      sagemaker_session_custom_endpoint.s3_client.list_objects_v2 = (
          Mock(name="list_objects_v2", return_value=LS_FILES)
      )
      sagemaker_session_custom_endpoint.s3_client.download_file = Mock(
          name="download_file"
      )
  
      sagemaker_session_custom_endpoint.download_data(
          DOWNLOAD_DATA_TESTS_FILES_DIR,
          BUCKET_NAME,
          key_prefix="/data/test.csv",
      )
  
      sagemaker_session_custom_endpoint.s3_client.download_file.assert_called_with(
          Bucket=BUCKET_NAME,
          Key="/data/test.csv",
          Filename="{}/{}".format(
              DOWNLOAD_DATA_TESTS_FILES_DIR, "test.csv"
          ),
          ExtraArgs=None,
      )
  
imports: from __future__ import absolute_import
  import jsonschema
  import pytest
  import urllib3
  import os
  from botocore.exceptions import ClientError
  from mock import Mock, patch
  from tests.unit import DATA_DIR, SAGEMAKER_CONFIG_SESSION
  import sagemaker
  from sagemaker.workflow.parameters import ParameterString
  from sagemaker.workflow.pipeline import Pipeline
  from tests.unit.sagemaker.workflow.helpers import CustomStep
  from sagemaker.local.local_session import LocalSession
  from sagemaker.local.entities import _LocalPipelineExecution
label_desc: Use image node_id 31 for calling a global function with example usage: test_local_session_download_with_custom_s3_endpoint_url(sagemaker_session_custom_endpoint) without return types