def METHOD_NAME(self, dock: QtAds.CDockWidget) -> None:
    """
    Handle dock widget close event.
    """
    if dock not in self.docks:
        return
    self.docks.remove(dock)
    view = self.view_to_dock.inverse.pop(dock, None)
    if view:
        view.close()
        self.remove_view(view)