class_docstr: A mixin class for SageMaker ``Inference Recommender`` that will be extended by ``Model``
class_docstr_tok: ["A","mixin","class","for","SageMaker","``","Inference","Recommender","``","that","will","be","extended","by","``","Model","``"]
docstr: Get recommendation from right size job
docstr_tok: ["Get","recommendation","from","right","size","job"]
code: def _get_right_size_recommendation(
      self,
      sage_client,
      job_or_model_name,
      inference_recommendation_id,
  ):
      """Get recommendation from right size job"""
      right_size_recommendation, right_size_job_res = None, None
      try:
          right_size_job_res = (
              sage_client.describe_inference_recommendations_job(
                  JobName=job_or_model_name
              )
          )
          if right_size_job_res:
              right_size_recommendation = self._search_recommendation(
                  recommendation_list=right_size_job_res[
                      "InferenceRecommendations"
                  ],
                  inference_recommendation_id=inference_recommendation_id,
              )
      except sage_client.exceptions.ResourceNotFound:
          pass
  
      return right_size_recommendation, right_size_job_res
  
imports: from __future__ import absolute_import
  import logging
  import re
  from typing import List, Dict, Optional
  import sagemaker
  from sagemaker.parameter import CategoricalParameter
label_desc: Use image node_id 10 for calling the InferenceRecommenderMixin obj's underlying member method code with example usage: obj._get_right_size_recommendation(sage_client, job_or_model_name, inference_recommendation_id) and returns: right_size_recommendation,  right_size_job_res