code: def send_task_to_executor(
      task_tuple: TaskInstanceInCelery,
  ) -> tuple[
      TaskInstanceKey, CommandType, AsyncResult | ExceptionWithTraceback
  ]:
      """Send task to executor."""
      key, command, queue, task_to_run = task_tuple
      try:
          with timeout(seconds=OPERATION_TIMEOUT):
              result = task_to_run.apply_async(
                  args=[command], queue=queue
              )
      except Exception as e:
          exception_traceback = (
              f"Celery Task ID: {key}\n{traceback.format_exc()}"
          )
          result = ExceptionWithTraceback(e, exception_traceback)
  
      return key, command, result
  
imports: from __future__ import annotations
  import contextlib
  import logging
  import math
  import os
  import subprocess
  import traceback
  import warnings
  from concurrent.futures import ProcessPoolExecutor
  from typing import TYPE_CHECKING, Any, Mapping, MutableMapping, Optional, Tuple
  from celery import Celery, Task, states
  from celery.backends.base import BaseKeyValueStoreBackend
  from celery.backends.database import DatabaseBackend, Task, retry, session_cleanup
  from celery.signals import import_modules
  from setproctitle import setproctitle
  from sqlalchemy import select
  import airflow.settings
  from airflow.configuration import conf
  from airflow.exceptions import AirflowException, RemovedInAirflow3Warning
  from airflow.executors.base_executor import BaseExecutor
  from airflow.stats import Stats
  from airflow.utils.dag_parsing_context import _airflow_parsing_context_manager
  from airflow.utils.log.logging_mixin import LoggingMixin
  from airflow.utils.net import get_hostname
  from airflow.utils.providers_configuration_loader import providers_configuration_loaded
  from airflow.utils.timeout import timeout
label_desc: Use image node_id 6 for calling a global function with example usage: send_task_to_executor(task_tuple) and returns: key,  command,  result