code: def _create_dock_toggle_action(self):
          
          # pylint: disable=W0201
          icon = resources_path('img', 'icons', 'icon.svg')
          self.action_dock = QAction(
              QIcon(icon),
              self.tr('Toggle InaSAFE Dock'), self.iface.mainWindow())
          self.action_dock.setObjectName('InaSAFEDockToggle')
          self.action_dock.setStatusTip(self.tr(
              'Show/hide InaSAFE dock widget'))
          self.action_dock.setWhatsThis(self.tr(
              'Show/hide InaSAFE dock widget'))
          self.action_dock.setCheckable(True)
          self.action_dock.setChecked(True)
          self.action_dock.triggered.connect(self.toggle_dock_visibility)
          self.add_action(self.action_dock)
docs: Create action for plugin dockable window (show/hide).