def _to_M8(key, tz=None):
if not isinstance(key, Timestamp):<EOL><INDENT>key = Timestamp(key)<EOL>if key.tzinfo is not None and tz is not None:<EOL><INDENT>key = key.tz_convert(tz)<EOL><DEDENT>else:<EOL><INDENT>key = key.tz_localize(tz)<EOL><DEDENT><DEDENT>return np.int64(conversion.pydt_to_i8(key)).view(_NS_DTYPE)<EOL>
Timestamp-like => dt64