def pad_rectangle(rect):
    """
    Decrease rectangle dimensions to show whitespace in treemap

    :param rect: Dictionary of rectangle dimensions to be decreased to enable
        whitespace padding in treemap visualization
    :return: Dictionary of updated rectangle dimensions
    """
    if rect['dx'] > 2:
        rect['x'] += 1
        rect['dx'] -= 2
    if rect['dy'] > 2:
        rect['y'] += 1
        rect['dy'] -= 2
