code: def get_default_logs_if_none(logs: str | None) -> str:
      if logs is None:
          return os.path.join(AIRFLOW_HOME, "logs")
      return logs
  
imports: from __future__ import annotations
  import contextlib
  import logging
  import os
  import shutil
  from datetime import datetime
  from pathlib import Path
  import pytest
  from airflow.configuration import AIRFLOW_HOME, AirflowConfigParser, get_airflow_config
  from airflow.exceptions import AirflowException
  from airflow.models.dagbag import DagBag
  from tests.test_utils import AIRFLOW_MAIN_FOLDER
  from tests.test_utils.logging_command_executor import get_executor
label_desc: Use image node_id 1 for calling a global function with example usage: get_default_logs_if_none(logs) and returns: logs, os