code: def test_predictor_custom_serialization(sagemaker_session):
      ipinsights = IPInsights(
          sagemaker_session=sagemaker_session, **ALL_REQ_ARGS
      )
      data = RecordSet(
          "s3://{}/{}".format(BUCKET_NAME, PREFIX),
          num_records=1,
          feature_dim=FEATURE_DIM,
          channel="train",
      )
      ipinsights.fit(data, MINI_BATCH_SIZE)
      model = ipinsights.create_model()
      custom_serializer = Mock()
      custom_deserializer = Mock()
      predictor = model.deploy(
          1,
          INSTANCE_TYPE,
          serializer=custom_serializer,
          deserializer=custom_deserializer,
      )
  
      assert isinstance(predictor, IPInsightsPredictor)
      assert predictor.serializer is custom_serializer
      assert predictor.deserializer is custom_deserializer
  
imports: from __future__ import absolute_import
  import pytest
  from mock import Mock, patch
  from sagemaker import image_uris
  from sagemaker.amazon.ipinsights import IPInsights, IPInsightsPredictor
  from sagemaker.amazon.amazon_estimator import RecordSet
  from sagemaker.session_settings import SessionSettings
label_desc: Use image node_id 17 for calling a global function with example usage: test_predictor_custom_serialization(sagemaker_session) without return types