def _get_timestamp_range_edges(first, last, offset, closed='<STR_LIT:left>', base=<NUM_LIT:0>):
if isinstance(offset, Tick):<EOL><INDENT>if isinstance(offset, Day):<EOL><INDENT>tz = first.tz<EOL>first = first.tz_localize(None)<EOL>last = last.tz_localize(None)<EOL><DEDENT>first, last = _adjust_dates_anchored(first, last, offset,<EOL>closed=closed, base=base)<EOL>if isinstance(offset, Day):<EOL><INDENT>first = first.tz_localize(tz)<EOL>last = last.tz_localize(tz)<EOL><DEDENT>return first, last<EOL><DEDENT>else:<EOL><INDENT>first = first.normalize()<EOL>last = last.normalize()<EOL><DEDENT>if closed == '<STR_LIT:left>':<EOL><INDENT>first = Timestamp(offset.rollback(first))<EOL><DEDENT>else:<EOL><INDENT>first = Timestamp(first - offset)<EOL><DEDENT>last = Timestamp(last + offset)<EOL>return first, last<EOL>
Adjust the `first` Timestamp to the preceeding Timestamp that resides on
the provided offset. Adjust the `last` Timestamp to the following
Timestamp that resides on the provided offset. Input Timestamps that
already reside on the offset will be adjusted depending on the type of
offset and the `closed` parameter.

Parameters
----------
first : pd.Timestamp
    The beginning Timestamp of the range to be adjusted.
last : pd.Timestamp
    The ending Timestamp of the range to be adjusted.
offset : pd.DateOffset
    The dateoffset to which the Timestamps will be adjusted.
closed : {'right', 'left'}, default None
    Which side of bin interval is closed.
base : int, default 0
    The "origin" of the adjusted Timestamps.

Returns
-------
A tuple of length 2, containing the adjusted pd.Timestamp objects.