def _validate_dt64_dtype(dtype):
if dtype is not None:<EOL><INDENT>dtype = pandas_dtype(dtype)<EOL>if is_dtype_equal(dtype, np.dtype("<STR_LIT>")):<EOL><INDENT>dtype = _NS_DTYPE<EOL>msg = textwrap.dedent("""<STR_LIT>""")<EOL>warnings.warn(msg, FutureWarning, stacklevel=<NUM_LIT:5>)<EOL><DEDENT>if ((isinstance(dtype, np.dtype) and dtype != _NS_DTYPE)<EOL>or not isinstance(dtype, (np.dtype, DatetimeTZDtype))):<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>.format(dtype=dtype))<EOL><DEDENT><DEDENT>return dtype<EOL>
Check that a dtype, if passed, represents either a numpy datetime64[ns]
dtype or a pandas DatetimeTZDtype.

Parameters
----------
dtype : object

Returns
-------
dtype : None, numpy.dtype, or DatetimeTZDtype

Raises
------
ValueError : invalid dtype

Notes
-----
Unlike validate_tz_from_dtype, this does _not_ allow non-existent
tz errors to go through