code: def test_custom_attributes():
      sagemaker_session = empty_sagemaker_session()
      predictor = Predictor(
          ENDPOINT, sagemaker_session=sagemaker_session
      )
  
      sagemaker_session.sagemaker_runtime_client.invoke_endpoint = Mock(
          return_value={"Body": io.StringIO("response")}
      )
  
      predictor.predict("payload", custom_attributes="custom-attribute")
  
      sagemaker_session.sagemaker_runtime_client.invoke_endpoint.assert_called_once_with(
          EndpointName=ENDPOINT,
          ContentType="application/octet-stream",
          Accept="*/*",
          CustomAttributes="custom-attribute",
          Body="payload",
      )
  
imports: from __future__ import absolute_import
  import io
  import json
  import pytest
  from mock import Mock, call, patch
  from sagemaker.deserializers import CSVDeserializer, PandasDeserializer
  from sagemaker.enums import EndpointType
  from sagemaker.model_monitor.model_monitoring import DEFAULT_REPOSITORY_NAME
  from sagemaker.predictor import Predictor
  from sagemaker.serializers import JSONSerializer, CSVSerializer
  from sagemaker.compute_resource_requirements.resource_requirements import ResourceRequirements
label_desc: Use image node_id 26 for calling a global function with example usage: test_custom_attributes() without return types