def _concat_datetime(to_concat, axis=<NUM_LIT:0>, typs=None):
if typs is None:<EOL><INDENT>typs = get_dtype_kinds(to_concat)<EOL><DEDENT>if len(typs) != <NUM_LIT:1>:<EOL><INDENT>return _concatenate_2d([_convert_datetimelike_to_object(x)<EOL>for x in to_concat],<EOL>axis=axis)<EOL><DEDENT>if any(typ.startswith('<STR_LIT>') for typ in typs):<EOL><INDENT>if '<STR_LIT>' in typs:<EOL><INDENT>to_concat = [x.astype(np.int64, copy=False) for x in to_concat]<EOL>return _concatenate_2d(to_concat, axis=axis).view(_NS_DTYPE)<EOL><DEDENT>else:<EOL><INDENT>return _concat_datetimetz(to_concat)<EOL><DEDENT><DEDENT>elif '<STR_LIT>' in typs:<EOL><INDENT>return _concatenate_2d([x.view(np.int64) for x in to_concat],<EOL>axis=axis).view(_TD_DTYPE)<EOL><DEDENT>elif any(typ.startswith('<STR_LIT>') for typ in typs):<EOL><INDENT>assert len(typs) == <NUM_LIT:1><EOL>cls = to_concat[<NUM_LIT:0>]<EOL>new_values = cls._concat_same_type(to_concat)<EOL>return new_values<EOL><DEDENT>
provide concatenation of an datetimelike array of arrays each of which is a
single M8[ns], datetimet64[ns, tz] or m8[ns] dtype

Parameters
----------
to_concat : array of arrays
axis : axis to provide concatenation
typs : set of to_concat dtypes

Returns
-------
a single array, preserving the combined dtypes