def _get_interval_closed_bounds(interval):
left, right = interval.left, interval.right<EOL>if interval.open_left:<EOL><INDENT>left = _get_next_label(left)<EOL><DEDENT>if interval.open_right:<EOL><INDENT>right = _get_prev_label(right)<EOL><DEDENT>return left, right<EOL>
Given an Interval or IntervalIndex, return the corresponding interval with
closed bounds.