code: def on_celery_import_modules(*args, **kwargs):
      """
      Preload some "expensive" airflow modules once, so other task processes won't have to import it again.
  
      Loading these for each task adds 0.3-0.5s *per task* before the task can run. For long running tasks this
      doesn't matter, but for short tasks this starts to be a noticeable impact.
      """
      import jinja2.ext  # noqa: F401
  
      import airflow.jobs.local_task_job_runner
      import airflow.macros
      import airflow.operators.bash
      import airflow.operators.python
      import airflow.operators.subdag  # noqa: F401
  
      with contextlib.suppress(ImportError):
          import numpy  # noqa: F401
  
      with contextlib.suppress(ImportError):
          import kubernetes.client
  
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 2 for calling a global function with example usage: on_celery_import_modules() without return types