code: def assert_convert_dttm(
      db_engine_spec: type[BaseEngineSpec],
      target_type: str,
      expected_result: str | None,
      dttm: datetime,
      db_extra: dict[str, Any] | None = None,
  ) -> None:
      for target in (
          target_type,
          target_type.upper(),
          target_type.lower(),
          target_type.capitalize(),
      ):
          assert (
              result := db_engine_spec.convert_dttm(
                  target_type=target,
                  dttm=dttm,
                  db_extra=db_extra,
              )
          ) == expected_result, result
  
imports: from __future__ import annotations
  from datetime import datetime
  from typing import Any, TYPE_CHECKING
  from sqlalchemy import types
  from superset.utils.core import GenericDataType
label_desc: Use image node_id 1 for calling a global function with example usage: assert_convert_dttm(db_engine_spec, target_type, expected_result, dttm, db_extra) without return types