def get_empty_dtype_and_na(join_units):
if len(join_units) == <NUM_LIT:1>:<EOL><INDENT>blk = join_units[<NUM_LIT:0>].block<EOL>if blk is None:<EOL><INDENT>return np.float64, np.nan<EOL><DEDENT><DEDENT>if is_uniform_reindex(join_units):<EOL><INDENT>empty_dtype = join_units[<NUM_LIT:0>].block.dtype<EOL>upcasted_na = join_units[<NUM_LIT:0>].block.fill_value<EOL>return empty_dtype, upcasted_na<EOL><DEDENT>has_none_blocks = False<EOL>dtypes = [None] * len(join_units)<EOL>for i, unit in enumerate(join_units):<EOL><INDENT>if unit.block is None:<EOL><INDENT>has_none_blocks = True<EOL><DEDENT>else:<EOL><INDENT>dtypes[i] = unit.dtype<EOL><DEDENT><DEDENT>upcast_classes = defaultdict(list)<EOL>null_upcast_classes = defaultdict(list)<EOL>for dtype, unit in zip(dtypes, join_units):<EOL><INDENT>if dtype is None:<EOL><INDENT>continue<EOL><DEDENT>if is_categorical_dtype(dtype):<EOL><INDENT>upcast_cls = '<STR_LIT>'<EOL><DEDENT>elif is_datetime64tz_dtype(dtype):<EOL><INDENT>upcast_cls = '<STR_LIT>'<EOL><DEDENT>elif issubclass(dtype.type, np.bool_):<EOL><INDENT>upcast_cls = '<STR_LIT:bool>'<EOL><DEDENT>elif issubclass(dtype.type, np.object_):<EOL><INDENT>upcast_cls = '<STR_LIT:object>'<EOL><DEDENT>elif is_datetime64_dtype(dtype):<EOL><INDENT>upcast_cls = '<STR_LIT>'<EOL><DEDENT>elif is_timedelta64_dtype(dtype):<EOL><INDENT>upcast_cls = '<STR_LIT>'<EOL><DEDENT>elif is_sparse(dtype):<EOL><INDENT>upcast_cls = dtype.subtype.name<EOL><DEDENT>elif is_extension_array_dtype(dtype):<EOL><INDENT>upcast_cls = '<STR_LIT:object>'<EOL><DEDENT>elif is_float_dtype(dtype) or is_numeric_dtype(dtype):<EOL><INDENT>upcast_cls = dtype.name<EOL><DEDENT>else:<EOL><INDENT>upcast_cls = '<STR_LIT:float>'<EOL><DEDENT>if unit.is_na:<EOL><INDENT>null_upcast_classes[upcast_cls].append(dtype)<EOL><DEDENT>else:<EOL><INDENT>upcast_classes[upcast_cls].append(dtype)<EOL><DEDENT><DEDENT>if not upcast_classes:<EOL><INDENT>upcast_classes = null_upcast_classes<EOL><DEDENT>if '<STR_LIT:object>' in upcast_classes:<EOL><INDENT>return np.dtype(np.object_), np.nan<EOL><DEDENT>elif '<STR_LIT:bool>' in upcast_classes:<EOL><INDENT>if has_none_blocks:<EOL><INDENT>return np.dtype(np.object_), np.nan<EOL><DEDENT>else:<EOL><INDENT>return np.dtype(np.bool_), None<EOL><DEDENT><DEDENT>elif '<STR_LIT>' in upcast_classes:<EOL><INDENT>return np.dtype(np.object_), np.nan<EOL><DEDENT>elif '<STR_LIT>' in upcast_classes:<EOL><INDENT>dtype = upcast_classes['<STR_LIT>']<EOL>return dtype[<NUM_LIT:0>], tslibs.NaT<EOL><DEDENT>elif '<STR_LIT>' in upcast_classes:<EOL><INDENT>return np.dtype('<STR_LIT>'), tslibs.iNaT<EOL><DEDENT>elif '<STR_LIT>' in upcast_classes:<EOL><INDENT>return np.dtype('<STR_LIT>'), tslibs.iNaT<EOL><DEDENT>else:  <EOL><INDENT>try:<EOL><INDENT>g = np.find_common_type(upcast_classes, [])<EOL><DEDENT>except TypeError:<EOL><INDENT>return np.dtype(np.object_), np.nan<EOL><DEDENT>else:<EOL><INDENT>if is_float_dtype(g):<EOL><INDENT>return g, g.type(np.nan)<EOL><DEDENT>elif is_numeric_dtype(g):<EOL><INDENT>if has_none_blocks:<EOL><INDENT>return np.float64, np.nan<EOL><DEDENT>else:<EOL><INDENT>return g, None<EOL><DEDENT><DEDENT><DEDENT><DEDENT>msg = "<STR_LIT>"<EOL>raise AssertionError(msg)<EOL>
Return dtype and N/A values to use when concatenating specified units.

Returned N/A value may be None which means there was no casting involved.

Returns
-------
dtype
na