docs: def wait_for_model_package(self, model_package_name, poll=5):
          """Wait for an Amazon SageMaker endpoint deployment to complete.
  
          Args:
              endpoint (str): Name of the ``Endpoint`` to wait for.
              poll (int): Polling interval in seconds (default: 5).
  
          Returns:
              dict: Return value from the ``DescribeEndpoint`` API.
          """
          desc = _wait_until(lambda: _create_model_package_status(self.sagemaker_client, model_package_name),
                             poll)
          status = desc['ModelPackageStatus']
  
          if status != 'Completed':
              reason = desc.get('FailureReason', None)
              raise ValueError('Error creating model package {}: {} Reason: {}'.format(
                  model_package_name, status, reason))
          return desc