def _get_format_timedelta64(values, nat_rep='<STR_LIT>', box=False):
values_int = values.astype(np.int64)<EOL>consider_values = values_int != iNaT<EOL>one_day_nanos = (<NUM_LIT> * <NUM_LIT>)<EOL>even_days = np.logical_and(consider_values,<EOL>values_int % one_day_nanos != <NUM_LIT:0>).sum() == <NUM_LIT:0><EOL>all_sub_day = np.logical_and(<EOL>consider_values, np.abs(values_int) >= one_day_nanos).sum() == <NUM_LIT:0><EOL>if even_days:<EOL><INDENT>format = None<EOL><DEDENT>elif all_sub_day:<EOL><INDENT>format = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>format = '<STR_LIT>'<EOL><DEDENT>def _formatter(x):<EOL><INDENT>if x is None or (is_scalar(x) and isna(x)):<EOL><INDENT>return nat_rep<EOL><DEDENT>if not isinstance(x, Timedelta):<EOL><INDENT>x = Timedelta(x)<EOL><DEDENT>result = x._repr_base(format=format)<EOL>if box:<EOL><INDENT>result = "<STR_LIT>".format(res=result)<EOL><DEDENT>return result<EOL><DEDENT>return _formatter<EOL>
Return a formatter function for a range of timedeltas.
These will all have the same format argument

If box, then show the return in quotes