code: def alchemy_to_dict(obj: Any) -> dict | None:
      """Transform a SQLAlchemy model instance into a dictionary."""
      if not obj:
          return None
      output = {}
      for col in obj.__table__.columns:
          value = getattr(obj, col.name)
          if isinstance(value, datetime):
              value = value.isoformat()
          output[col.name] = value
      return output
  
imports: from __future__ import annotations
  import copy
  import itertools
  import re
  import signal
  import warnings
  from datetime import datetime
  from functools import reduce
  from typing import TYPE_CHECKING, Any, Callable, Generator, Iterable, Mapping, MutableMapping, TypeVar, cast
  from lazy_object_proxy import Proxy
  from airflow.configuration import conf
  from airflow.exceptions import AirflowException, RemovedInAirflow3Warning
  from airflow.utils.module_loading import import_string
  from airflow.utils.types import NOTSET
label_desc: Use image node_id 3 for calling a global function with example usage: alchemy_to_dict(obj) and returns: output, None