class_docstr: Make prediction requests to an Amazon SageMaker endpoint.
class_docstr_tok: ["Make","prediction","requests","to","an","Amazon","SageMaker","endpoint","."]
docstr: Placeholder docstring
docstr_tok: ["Placeholder","docstring"]
code: def _create_request_args(
      self,
      data,
      initial_args=None,
      target_model=None,
      target_variant=None,
      inference_id=None,
      custom_attributes=None,
  ):
      """Placeholder docstring"""
  
      jumpstart_serialized_data: Optional[Union[str, bytes]] = None
      jumpstart_accept: Optional[str] = None
      jumpstart_content_type: Optional[str] = None
  
      if isinstance(data, JumpStartSerializablePayload):
          s3_client = self.sagemaker_session.s3_client
          region = self.sagemaker_session._region_name
          bucket = get_jumpstart_content_bucket(region)
  
          jumpstart_serialized_data = PayloadSerializer(
              bucket=bucket, region=region, s3_client=s3_client
          ).serialize(data)
          jumpstart_content_type = data.content_type
          jumpstart_accept = data.accept
  
      args = dict(initial_args) if initial_args else {}
  
      if "EndpointName" not in args:
          args["EndpointName"] = self.endpoint_name
  
      if "ContentType" not in args:
          if (
              isinstance(data, JumpStartSerializablePayload)
              and jumpstart_content_type
          ):
              args["ContentType"] = jumpstart_content_type
          else:
              args["ContentType"] = (
                  self.content_type
                  if isinstance(self.content_type, str)
                  else ", ".join(self.content_type)
              )
  
      if "Accept" not in args:
          if (
              isinstance(data, JumpStartSerializablePayload)
              and jumpstart_accept
          ):
              args["Accept"] = jumpstart_accept
          else:
              args["Accept"] = (
                  self.accept
                  if isinstance(self.accept, str)
                  else ", ".join(self.accept)
              )
  
      if target_model:
          args["TargetModel"] = target_model
  
      if target_variant:
          args["TargetVariant"] = target_variant
  
      if inference_id:
          args["InferenceId"] = inference_id
  
      if custom_attributes:
          args["CustomAttributes"] = custom_attributes
  
      data = (
          jumpstart_serialized_data
          if isinstance(data, JumpStartSerializablePayload)
          and jumpstart_serialized_data
          else self.serializer.serialize(data)
      )
      if self._get_component_name():
          args["InferenceComponentName"] = self.component_name
  
      args["Body"] = data
      return args
  
imports: from __future__ import print_function, absolute_import
  import abc
  import datetime
  from typing import Any, Dict, Optional, Tuple, Union
  import logging
  from sagemaker.enums import EndpointType
  from sagemaker.deprecations import deprecated_class, deprecated_deserialize, deprecated_serialize, removed_kwargs, renamed_kwargs, renamed_warning
  from sagemaker.deserializers import BytesDeserializer, CSVDeserializer, JSONDeserializer, NumpyDeserializer, StreamDeserializer, StringDeserializer
  from sagemaker.jumpstart.payload_utils import PayloadSerializer
  from sagemaker.jumpstart.types import JumpStartSerializablePayload
  from sagemaker.jumpstart.utils import get_jumpstart_content_bucket
  from sagemaker.model_monitor import DataCaptureConfig, DefaultModelMonitor, ModelBiasMonitor, ModelExplainabilityMonitor, ModelMonitor, ModelQualityMonitor
  from sagemaker.serializers import CSVSerializer, IdentitySerializer, JSONSerializer, NumpySerializer
  from sagemaker.session import production_variant, Session
  from sagemaker.utils import name_from_base, stringify_object, format_tags
  from sagemaker.model_monitor.model_monitoring import DEFAULT_REPOSITORY_NAME
  from sagemaker.lineage.context import EndpointContext
  from sagemaker.compute_resource_requirements.resource_requirements import ResourceRequirements
label_desc: Use image node_id 4 for calling the Predictor obj's underlying member method code with example usage: obj._create_request_args(data, initial_args, target_model, target_variant, inference_id, custom_attributes) and returns: args