code: def datetime_to_long(dt):
      """Converts a datetime object to a long integer representing the number
      of microseconds since ``datetime.min``.
      """
  
      return timedelta_to_usecs(dt.replace(tzinfo=None) - dt.min)
  
imports: import calendar
  import copy
  from datetime import date, datetime, timedelta
  from whoosh.compat import iteritems
label_desc: Use image node_id 3 for calling a global function with example usage: datetime_to_long(dt) and returns: timedelta_to_usecs