class_docstr: Dashboard class for creating interactive dashboard objects.
  
  Dashboards are dicts that contain boxes which hold plot information.
  These boxes can be arranged in various ways. The most basic form of
  a box is:
  
  ```
  {
      'type': 'box',
      'boxType': 'plot'
  }
  ```
  
  where 'fileId' can be set to the 'username:#' of your plot. The other
  parameters a box takes are `shareKey` (default is None) and `title`
  (default is '').
  
  `.get_preview()` should be called quite regularly to get an HTML
  representation of the dashboard in which the boxes in the HTML
  are labelled with on-the-fly-generated numbers or box ids which
  change after each modification to the dashboard.
  
  `.get_box()` returns the box located in the dashboard by calling
  its box id as displayed via `.get_preview()`.
  
  Example 1: Create a simple Dashboard object
  ```
  import plotly.dashboard_objs as dashboard
  
  box_a = {
      'type': 'box',
      'boxType': 'plot',
      'fileId': 'username:some#',
      'title': 'box a'
  }
  
  box_b = {
      'type': 'box',
      'boxType': 'plot',
      'fileId': 'username:some#',
      'title': 'box b'
  }
  
  box_c = {
      'type': 'box',
      'boxType': 'plot',
      'fileId': 'username:some#',
      'title': 'box c'
  }
  
  my_dboard = dashboard.Dashboard()
  my_dboard.insert(box_a)
  # my_dboard.get_preview()
  my_dboard.insert(box_b, 'above', 1)
  # my_dboard.get_preview()
  my_dboard.insert(box_c, 'left', 2)
  # my_dboard.get_preview()
  my_dboard.swap(1, 2)
  # my_dboard.get_preview()
  my_dboard.remove(1)
  # my_dboard.get_preview()
  ```
  
  Example 2: 4 vertical boxes of equal height
  ```
  import plotly.dashboard_objs as dashboard
  
  box_a = {
      'type': 'box',
      'boxType': 'plot',
      'fileId': 'username:some#',
      'title': 'box a'
  }
  
  my_dboard = dashboard.Dashboard()
  my_dboard.insert(box_a)
  my_dboard.insert(box_a, 'below', 1)
  my_dboard.insert(box_a, 'below', 1)
  my_dboard.insert(box_a, 'below', 3)
  # my_dboard.get_preview()
  ```
docstr: Swap two boxes with their specified ids.
  
  Example:
  ```
  import plotly.dashboard_objs as dashboard
  
  box_a = {
      'type': 'box',
      'boxType': 'plot',
      'fileId': 'username:first#',
      'title': 'box a'
  }
  
  box_b = {
      'type': 'box',
      'boxType': 'plot',
      'fileId': 'username:second#',
      'title': 'box b'
  }
  
  my_dboard = dashboard.Dashboard()
  my_dboard.insert(box_a)
  my_dboard.insert(box_b, '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)
  ```
docstr_tok: ["Swap","two","boxes","with","their","specified","ids",".","Example",":","``","`","import","plotly.dashboard_objs","as","dashboard","box_a","=","{","'type","'",":","'box","'",",","'boxType","'",":","'plot","'",",","'fileId","'",":","'username",":","first","#","'",",","'title","'",":","'box","a'","}","box_b","=","{","'type","'",":","'box","'",",","'boxType","'",":","'plot","'",",","'fileId","'",":","'username",":","second","#","'",",","'title","'",":","'box","b'","}","my_dboard","=","dashboard.Dashboard","(",")","my_dboard.insert","(","box_a",")","my_dboard.insert","(","box_b",",","'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",")","``","`"]
code: def swap(self, box_id_1, box_id_2):
      """
      Swap two boxes with their specified ids.
  
      Example:
      ```
      import plotly.dashboard_objs as dashboard
  
      box_a = {
          'type': 'box',
          'boxType': 'plot',
          'fileId': 'username:first#',
          'title': 'box a'
      }
  
      box_b = {
          'type': 'box',
          'boxType': 'plot',
          'fileId': 'username:second#',
          'title': 'box b'
      }
  
      my_dboard = dashboard.Dashboard()
      my_dboard.insert(box_a)
      my_dboard.insert(box_b, '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)
      ```
      """
      box_ids_to_path = self._compute_box_ids()
      box_a = self.get_box(box_id_1)
      box_b = self.get_box(box_id_2)
  
      box_a_path = box_ids_to_path[box_id_1]
      box_b_path = box_ids_to_path[box_id_2]
  
      for pairs in [(box_a_path, box_b), (box_b_path, box_a)]:
          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]
  
imports: import pprint
  import _plotly_utils.exceptions
  from _plotly_utils import optional_imports
  from chart_studio import exceptions
label_desc: Use image node_id 11 for calling the Dashboard obj's underlying member method code with example usage: obj.swap(box_id_1, box_id_2) without return types