code: def datetime_equals(
      dt1: Optional[datetime], dt2: Optional[datetime]
  ) -> bool:
      """Compare equality of two datetimes, ignoring microseconds."""
      if not dt1 and not dt2:
          return True
      if not (dt1 and dt2):
          return False
      return dt1.replace(microsecond=0) == dt2.replace(microsecond=0)
  
file_path: Ax/ax/utils/common/equality.py
imports: from __future__ import annotations
  from datetime import datetime
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import numpy
  import pandas
  from ax.utils.common.typeutils import numpy_type_to_python_type
label_desc: Use image node_id 3 for calling a global function with example usage: datetime_equals(dt1, dt2) and returns: unknown, True, False