code: def _fetch_logs_from_service(url, log_relative_path):
      # Import occurs in function scope for perf. Ref: https://github.com/apache/airflow/pull/21438
      import httpx
  
      from airflow.utils.jwt_signer import JWTSigner
  
      timeout = conf.getint(
          "webserver", "log_fetch_timeout_sec", fallback=None
      )
      signer = JWTSigner(
          secret_key=conf.get("webserver", "secret_key"),
          expiration_time_in_seconds=conf.getint(
              "webserver", "log_request_clock_grace", fallback=30
          ),
          audience="task-instance-logs",
      )
      response = httpx.get(
          url,
          timeout=timeout,
          headers={
              "Authorization": signer.generate_signed_token(
                  {"filename": log_relative_path}
              )
          },
      )
      response.encoding = "utf-8"
      return response
  
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 2 for calling a global function with example usage: _fetch_logs_from_service(url, log_relative_path) and returns: response