class_docstr: CeleryKubernetesExecutor consists of CeleryExecutor and KubernetesExecutor.
  
  It chooses an executor to use based on the queue defined on the task.
  When the queue is the value of ``kubernetes_queue`` in section ``[celery_kubernetes_executor]``
  of the configuration (default value: `kubernetes`), KubernetesExecutor is selected to run the task,
  otherwise, CeleryExecutor is used.
class_docstr_tok: ["CeleryKubernetesExecutor","consists","of","CeleryExecutor","and","KubernetesExecutor",".","It","chooses","an","executor","to","use","based","on","the","queue","defined","on","the","task",".","When","the","queue","is","the","value","of","``","kubernetes_queue","``","in","section","``","[","celery_kubernetes_executor","]","``","of","the","configuration","(","default","value",":","`","kubernetes","`",")",",","KubernetesExecutor","is","selected","to","run","the","task",",","otherwise",",","CeleryExecutor","is","used","."]
docstr: Try to adopt running task instances that have been abandoned by a SchedulerJob dying.
  
  Anything that is not adopted will be cleared by the scheduler (and then become eligible for
  re-scheduling)
  
  :return: any TaskInstances that were unable to be adopted
docstr_tok: ["Try","to","adopt","running","task","instances","that","have","been","abandoned","by","a","SchedulerJob","dying",".","Anything","that","is","not","adopted","will","be","cleared","by","the","scheduler","(","and","then","become","eligible","for","re-scheduling",")",":","return",":","any","TaskInstances","that","were","unable","to","be","adopted"]
code: def try_adopt_task_instances(
      self, tis: Sequence[TaskInstance]
  ) -> Sequence[TaskInstance]:
      """
      Try to adopt running task instances that have been abandoned by a SchedulerJob dying.
  
      Anything that is not adopted will be cleared by the scheduler (and then become eligible for
      re-scheduling)
  
      :return: any TaskInstances that were unable to be adopted
      """
      celery_tis = [
          ti for ti in tis if ti.queue != self.kubernetes_queue
      ]
      kubernetes_tis = [
          ti for ti in tis if ti.queue == self.kubernetes_queue
      ]
      return [
          *self.celery_executor.try_adopt_task_instances(celery_tis),
          *self.kubernetes_executor.try_adopt_task_instances(
              kubernetes_tis
          ),
      ]
  
imports: from __future__ import annotations
  from functools import cached_property
  from typing import TYPE_CHECKING, Sequence
  from airflow.configuration import conf
  from airflow.providers.celery.executors.celery_executor import CeleryExecutor
  from airflow.utils.log.logging_mixin import LoggingMixin
  from airflow.utils.providers_configuration_loader import providers_configuration_loaded
label_desc: Use image node_id 15 for calling the CeleryKubernetesExecutor obj's underlying member method code with example usage: obj.try_adopt_task_instances(tis) and returns: list