def _shallow_copy(self, left=None, right=None, closed=None):
if left is None:<EOL><INDENT>left, right = self.left, self.right<EOL><DEDENT>elif right is None:<EOL><INDENT>if not isinstance(left, (type(self), ABCIntervalIndex)):<EOL><INDENT>left = type(self)(left)<EOL><DEDENT>left, right = left.left, left.right<EOL><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT>closed = closed or self.closed<EOL>return self._simple_new(<EOL>left, right, closed=closed, verify_integrity=False)<EOL>
Return a new IntervalArray with the replacement attributes

Parameters
----------
left : array-like
    Values to be used for the left-side of the the intervals.
    If None, the existing left and right values will be used.

right : array-like
    Values to be used for the right-side of the the intervals.
    If None and left is IntervalArray-like, the left and right
    of the IntervalArray-like will be used.

closed : {'left', 'right', 'both', 'neither'}, optional
    Whether the intervals are closed on the left-side, right-side, both
    or neither.  If None, the existing closed will be used.