def timestamp_from_datetime(dt):
return calendar.timegm(dt.utctimetuple()) + (dt.microsecond / <NUM_LIT>)<EOL>
Returns a timestamp from datetime ``dt``.

Note that timestamps are always UTC. If ``dt`` is aware, the resulting
timestamp will correspond to the correct UTC time.

>>> timestamp_from_datetime(datetime.datetime(1970, 1, 1, 0, 20, 34, 500000))
1234.5