code: def test_target_variant_invocation(
      sagemaker_session, multi_variant_endpoint
  ):
      response = (
          sagemaker_session.sagemaker_runtime_client.invoke_endpoint(
              EndpointName=multi_variant_endpoint.endpoint_name,
              Body=TEST_CSV_DATA,
              ContentType="text/csv",
              Accept="text/csv",
              TargetVariant=TEST_VARIANT_1,
          )
      )
      assert response["InvokedProductionVariant"] == TEST_VARIANT_1
  
      response = (
          sagemaker_session.sagemaker_runtime_client.invoke_endpoint(
              EndpointName=multi_variant_endpoint.endpoint_name,
              Body=TEST_CSV_DATA,
              ContentType="text/csv",
              Accept="text/csv",
              TargetVariant=TEST_VARIANT_2,
          )
      )
      assert response["InvokedProductionVariant"] == TEST_VARIANT_2
  
imports: from __future__ import absolute_import
  import json
  import math
  import os
  import pytest
  import scipy.stats
  from sagemaker import image_uris
  from sagemaker.deserializers import CSVDeserializer
  from sagemaker.s3 import S3Uploader
  from sagemaker.session import production_variant
  from sagemaker.sparkml import SparkMLModel
  from sagemaker.utils import unique_name_from_base
  from sagemaker.predictor import Predictor
  from sagemaker.serializers import CSVSerializer
  import tests.integ
label_desc: Use image node_id 2 for calling a global function with example usage: test_target_variant_invocation(sagemaker_session, multi_variant_endpoint) without return types