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 _get_model_names(self):
      """Placeholder docstring"""
      if self._model_names is not None:
          return self._model_names
      self._model_names = []
  
      # If the predictor is for Inference Component, return the model behind the
      # Inference Component. Otherwise, fetch all models behind the Endpoint
      component_name = self._get_component_name()
      if component_name:
          desc = self.sagemaker_session.describe_inference_component(
              component_name
          )
          if (
              "Specification" in desc
              and "ModelName" in desc["Specification"]
          ):
              self._model_names.append(
                  desc["Specification"]["ModelName"]
              )
          return self._model_names
  
      current_endpoint_config_name = self._get_endpoint_config_name()
      endpoint_config = self.sagemaker_session.sagemaker_client.describe_endpoint_config(
          EndpointConfigName=current_endpoint_config_name
      )
      production_variants = endpoint_config["ProductionVariants"]
      for d in production_variants:
          if "ModelName" in d:
              self._model_names.append(d["ModelName"])
      return self._model_names
  
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 19 for calling the Predictor obj's underlying member method code with example usage: obj._get_model_names() and returns: self, self, self