def _maybe_localize_point(ts, is_none, is_not_none, freq, tz):
<EOL>if isinstance(freq, Tick) or freq is None:<EOL><INDENT>localize_args = {'<STR_LIT>': tz, '<STR_LIT>': False}<EOL><DEDENT>else:<EOL><INDENT>localize_args = {'<STR_LIT>': None}<EOL><DEDENT>if is_none is None and is_not_none is not None:<EOL><INDENT>ts = ts.tz_localize(**localize_args)<EOL><DEDENT>return ts<EOL>
Localize a start or end Timestamp to the timezone of the corresponding
start or end Timestamp

Parameters
----------
ts : start or end Timestamp to potentially localize
is_none : argument that should be None
is_not_none : argument that should not be None
freq : Tick, DateOffset, or None
tz : str, timezone object or None

Returns
-------
ts : Timestamp