code: def poll_for_deployment_recommendation(
      created_base_model, sagemaker_session
  ):
      with timeout(minutes=1):
          try:
              completed = False
              while not completed:
                  describe_model_response = (
                      sagemaker_session.sagemaker_client.describe_model(
                          ModelName=created_base_model.name
                      )
                  )
                  deployment_recommendation = (
                      describe_model_response.get(
                          "DeploymentRecommendation"
                      )
                  )
  
                  completed = (
                      deployment_recommendation is not None
                      and "COMPLETED"
                      == deployment_recommendation.get(
                          "RecommendationStatus"
                      )
                  )
              return deployment_recommendation
          except Exception as e:
              created_base_model.delete_model()
              raise e
  
imports: from __future__ import absolute_import
  import os
  import time
  import pytest
  from botocore.exceptions import ClientError
  from sagemaker import image_uris
  from sagemaker.model import Model
  from sagemaker.sklearn.model import SKLearnModel, SKLearnPredictor
  from sagemaker.utils import unique_name_from_base
  from tests.integ import DATA_DIR
  from tests.integ.timeout import timeout
  import pandas
  from sagemaker.inference_recommender.inference_recommender_mixin import Phase, ModelLatencyThreshold
  from sagemaker.parameter import CategoricalParameter
  import logging
label_desc: Use image node_id 15 for calling a global function with example usage: poll_for_deployment_recommendation(created_base_model, sagemaker_session) and returns: deployment_recommendation