class_docstr: Interact with Amazon SageMaker.
  
  Provide thick wrapper around
  :external+boto3:py:class:`boto3.client("sagemaker") <SageMaker.Client>`.
  
  Additional arguments (such as ``aws_conn_id``) may be specified and
  are passed down to the underlying AwsBaseHook.
  
  .. seealso::
      - :class:`airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook`
class_docstr_tok: ["Interact","with","Amazon","SageMaker",".","Provide","thick","wrapper","around",":","external+boto3",":","py",":","class",":","`","boto3.client","(","``","sagemaker","''",")","<","SageMaker.Client",">","`",".","Additional","arguments","(","such","as","``","aws_conn_id","``",")","may","be","specified","and","are","passed","down","to","the","underlying","AwsBaseHook",".","..","seealso",":",":","-",":","class",":","`","airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook","`"]
docstr: Iterate over the available events.
  
  The events coming from a set of log streams in a single log group
  interleaving the events from each stream so they're yielded in timestamp order.
  
  :param log_group: The name of the log group.
  :param streams: A list of the log stream names. The position of the stream in this list is
      the stream number.
  :param positions: A list of pairs of (timestamp, skip) which represents the last record
      read from each stream.
  :return: A tuple of (stream number, cloudwatch log event).
code: def multi_stream_iter(
      self, log_group: str, streams: list, positions=None
  ) -> Generator:
      """Iterate over the available events.
  
      The events coming from a set of log streams in a single log group
      interleaving the events from each stream so they're yielded in timestamp order.
  
      :param log_group: The name of the log group.
      :param streams: A list of the log stream names. The position of the stream in this list is
          the stream number.
      :param positions: A list of pairs of (timestamp, skip) which represents the last record
          read from each stream.
      :return: A tuple of (stream number, cloudwatch log event).
      """
      positions = positions or {
          s: Position(timestamp=0, skip=0) for s in streams
      }
      event_iters = [
          self.logs_hook.get_log_events(
              log_group, s, positions[s].timestamp, positions[s].skip
          )
          for s in streams
      ]
      events: list[Any | None] = []
      for event_stream in event_iters:
          if event_stream:
              try:
                  events.append(next(event_stream))
              except StopIteration:
                  events.append(None)
          else:
              events.append(None)
  
      while any(events):
          i = (
              argmin(
                  events, lambda x: x["timestamp"] if x else 9999999999
              )
              or 0
          )
          yield i, events[i]
          try:
              events[i] = next(event_iters[i])
          except StopIteration:
              events[i] = None
  
imports: from __future__ import annotations
  import os
  import re
  import tarfile
  import tempfile
  import time
  import warnings
  from collections import Counter, namedtuple
  from datetime import datetime
  from functools import partial
  from typing import Any, Callable, Generator, cast
  from botocore.exceptions import ClientError
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
  from airflow.providers.amazon.aws.hooks.logs import AwsLogsHook
  from airflow.providers.amazon.aws.hooks.s3 import S3Hook
  from airflow.providers.amazon.aws.utils.tags import format_tags
  from airflow.utils import timezone
label_desc: Use image node_id 7 for calling the SageMakerHook obj's underlying member method code with example usage: obj.multi_stream_iter(log_group, streams, positions) without return types