def change_size_for_pane(self, pane, up=<NUM_LIT:0>, right=<NUM_LIT:0>, down=<NUM_LIT:0>, left=<NUM_LIT:0>):
assert isinstance(pane, Pane)<EOL>def find_split_and_child(split_cls, is_before):<EOL><INDENT>"<STR_LIT>"<EOL>child = pane<EOL>split = self._get_parent(child)<EOL>def found():<EOL><INDENT>return isinstance(split, split_cls) and (<EOL>not is_before or split.index(child) > <NUM_LIT:0>) and (<EOL>is_before or split.index(child) < len(split) - <NUM_LIT:1>)<EOL><DEDENT>while split and not found():<EOL><INDENT>child = split<EOL>split = self._get_parent(child)<EOL><DEDENT>return split, child  <EOL><DEDENT>def handle_side(split_cls, is_before, amount, trying_other_side=False):<EOL><INDENT>"<STR_LIT>"<EOL>if amount:<EOL><INDENT>split, child = find_split_and_child(split_cls, is_before)<EOL>if split:<EOL><INDENT>neighbour_index = split.index(child) + (-<NUM_LIT:1> if is_before else <NUM_LIT:1>)<EOL>neighbour_child = split[neighbour_index]<EOL>split.weights[child] += amount<EOL>split.weights[neighbour_child] -= amount<EOL>for k, value in split.weights.items():<EOL><INDENT>if value < <NUM_LIT:1>:<EOL><INDENT>split.weights[k] = <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if not trying_other_side:<EOL><INDENT>handle_side(split_cls, not is_before, -amount,<EOL>trying_other_side=True)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>handle_side(VSplit, True, left)<EOL>handle_side(VSplit, False, right)<EOL>handle_side(HSplit, True, up)<EOL>handle_side(HSplit, False, down)<EOL>
Increase the size of the current pane in any of the four directions.
Positive values indicate an increase, negative values a decrease.