'Swap two boxes with their specified ids.
Example:
import plotly.dashboard_objs as dashboard
box_1 = {
\'type\': \'box\',
\'boxType\': \'plot\',
\'fileId\': \'username:first#\',
\'title\': \'first box\'
box_2 = {
\'type\': \'box\',
\'boxType\': \'plot\',
\'fileId\': \'username:second#\',
\'title\': \'second box\'
my_dboard = dashboard.Dashboard()
my_dboard.insert(box_1)
my_dboard.insert(box_2, \'above\', 1)
# check box at box id 1
box_at_1 = my_dboard.get_box(1)
print(box_at_1)
my_dboard.swap(1, 2)
box_after_swap = my_dboard.get_box(1)
print(box_after_swap)'

def swap(self, box_id_1, box_id_2):

    box_ids_to_path = self._compute_box_ids()
    box_1 = self.get_box(box_id_1)
    box_2 = self.get_box(box_id_2)
    box_1_path = box_ids_to_path[box_id_1]
    box_2_path = box_ids_to_path[box_id_2]
    for pairs in [(box_1_path, box_2), (box_2_path, box_1)]:
        loc_in_dashboard = self['layout']
        for first_second in pairs[0][:(-1)]:
            loc_in_dashboard = loc_in_dashboard[first_second]
        loc_in_dashboard[pairs[0][(-1)]] = pairs[1]
    self._set_container_sizes()
