code: def test_predictor(sagemaker_session):
      predictor = TensorFlowPredictor("endpoint", sagemaker_session)
  
      mock_response(
          json.dumps(PREDICT_RESPONSE).encode("utf-8"),
          sagemaker_session,
      )
      result = predictor.predict(PREDICT_INPUT)
  
      assert_invoked(
          sagemaker_session,
          EndpointName="endpoint",
          ContentType=JSON_CONTENT_TYPE,
          Accept=JSON_CONTENT_TYPE,
          Body=json.dumps(PREDICT_INPUT),
      )
  
      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 13 for calling a global function with example usage: test_predictor(sagemaker_session) without return types