code: def _datetime_for_anyvalue(dt: datetime) -> tuple[int, int]:
      """Used in pyo3 anyvalue conversion."""
      # returns (s, ms)
      if dt.tzinfo is None:
          return (
              _timestamp_in_seconds(dt.replace(tzinfo=timezone.utc)),
              dt.microsecond,
          )
      return (_timestamp_in_seconds(dt), dt.microsecond)
  
imports: from __future__ import annotations
  import sys
  from datetime import datetime, time, timedelta, timezone
  from decimal import Context
  from functools import lru_cache
  from typing import TYPE_CHECKING, Any, Callable, Sequence, TypeVar, overload
  from polars.dependencies import _ZONEINFO_AVAILABLE, zoneinfo
label_desc: Use image node_id 15 for calling a global function with example usage: _datetime_for_anyvalue(dt) and returns: _timestamp_in_seconds,  dt, _timestamp_in_seconds,  dt