code: def get_action(self, create=False):
          
          action = self._widget_action
          if action is None and create:
              action = self._widget_action = QWidgetAction(None)
              action.setDefaultWidget(self.widget)
          return action
docs: Get the shared widget action for this widget.
  
          This API is used to support widgets in tool bars and menus.
  
          Parameters
          ----------
          create : bool, optional
              Whether to create the action if it doesn't already exist.
              The default is False.
  
          Returns
          -------
          result : QWidgetAction or None
              The cached widget action or None, depending on arguments.