code: def _interleave_logs(*logs):
      records = []
      for log in logs:
          records.extend(
              _parse_timestamps_in_log_file(log.splitlines())
          )
      last = None
      for _, _, v in sorted(
          records,
          key=lambda x: (x[0], x[1])
          if x[0]
          else (pendulum.datetime(2000, 1, 1), x[1]),
      ):
          if v != last:  # dedupe
              yield v
          last = v
  
imports: from __future__ import annotations
  import inspect
  import logging
  import os
  import warnings
  from contextlib import suppress
  from enum import Enum
  from functools import cached_property
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Callable, Iterable
  from urllib.parse import urljoin
  import pendulum
  from airflow.configuration import conf
  from airflow.exceptions import AirflowException, RemovedInAirflow3Warning
  from airflow.executors.executor_loader import ExecutorLoader
  from airflow.utils.context import Context
  from airflow.utils.helpers import parse_template_string, render_template_to_string
  from airflow.utils.log.logging_mixin import SetContextPropagate
  from airflow.utils.log.non_caching_file_handler import NonCachingFileHandler
  from airflow.utils.session import create_session
  from airflow.utils.state import State, TaskInstanceState
label_desc: Use image node_id 4 for calling a global function with example usage: _interleave_logs() without return types