code: def mock_response(
      expected_response,
      sagemaker_session,
      content_type=JSON_CONTENT_TYPE,
  ):
      sagemaker_session.sagemaker_runtime_client.invoke_endpoint.return_value = {
          "ContentType": content_type,
          "Body": io.BytesIO(expected_response),
      }
  
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 23 for calling a global function with example usage: mock_response(expected_response, sagemaker_session, content_type) without return types