code: def test_predictor_csv(sagemaker_session):
      predictor = TensorFlowPredictor(
          "endpoint", sagemaker_session, serializer=CSVSerializer()
      )
  
      mock_response(
          json.dumps(PREDICT_RESPONSE).encode("utf-8"),
          sagemaker_session,
      )
      result = predictor.predict([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]])
  
      assert_invoked(
          sagemaker_session,
          EndpointName="endpoint",
          ContentType=CSV_CONTENT_TYPE,
          Accept=JSON_CONTENT_TYPE,
          Body="1.0,2.0,3.0\n4.0,5.0,6.0",
      )
  
      assert PREDICT_RESPONSE == result
  
imports: from __future__ import absolute_import
  import io
  import json
  import logging
  import mock
  import pytest
  from mock import Mock, patch, ANY
  from sagemaker.serializers import CSVSerializer, IdentitySerializer
  from sagemaker.tensorflow import TensorFlow, TensorFlowModel, TensorFlowPredictor
label_desc: Use image node_id 15 for calling a global function with example usage: test_predictor_csv(sagemaker_session) without return types