parameters: (self, table)
docstring: Sets up the context menu actions for the table
          :type table: QTableView
          :param table: The table whose context menu actions will be set up.
          :param ws_read_function: The read function used to efficiently retrieve data directly from the workspace
docstring_summary: Sets up the context menu actions for the table
          :type table: QTableView
          :param table: The table whose context menu actions will be set up.
          :param ws_read_function: The read function used to efficiently retrieve data directly from the workspace
docstring_tokens: Sets up the context menu actions for the table : type table : QTableView : param table : The table whose context menu actions will be set up . : param ws_read_function : The read function used to efficiently retrieve data directly from the workspace
function: def set_context_menu_actions(self, table):
          """
          Sets up the context menu actions for the table
          :type table: QTableView
          :param table: The table whose context menu actions will be set up.
          :param ws_read_function: The read function used to efficiently retrieve data directly from the workspace
          """
          copy_action = QAction(self.COPY_ICON, "Copy", table)
          # sets the first (table) parameter of the copy action callback
          # so that each context menu can copy the data from the correct table
          decorated_copy_action_with_correct_table = partial(self.presenter.action_copy_cells, table)
          copy_action.triggered.connect(decorated_copy_action_with_correct_table)
  
          table.setContextMenuPolicy(Qt.ActionsContextMenu)
          table.addAction(copy_action)
  
          horizontalHeader = table.horizontalHeader()
          horizontalHeader.setContextMenuPolicy(Qt.CustomContextMenu)
          horizontalHeader.setSectionResizeMode(QHeaderView.Fixed)
          horizontalHeader.customContextMenuRequested.connect(self.bin_context_menu_opened)
  
          verticalHeader = table.verticalHeader()
          verticalHeader.setContextMenuPolicy(Qt.CustomContextMenu)
          verticalHeader.setSectionResizeMode(QHeaderView.Fixed)
          verticalHeader.customContextMenuRequested.connect(self.spectra_context_menu_opened)
function_tokens: def set_context_menu_actions ( self , table ) : copy_action = QAction ( self . COPY_ICON , "Copy" , table ) # sets the first (table) parameter of the copy action callback # so that each context menu can copy the data from the correct table decorated_copy_action_with_correct_table = partial ( self . presenter . action_copy_cells , table ) copy_action . triggered . connect ( decorated_copy_action_with_correct_table ) table . setContextMenuPolicy ( Qt . ActionsContextMenu ) table . addAction ( copy_action ) horizontalHeader = table . horizontalHeader ( ) horizontalHeader . setContextMenuPolicy ( Qt . CustomContextMenu ) horizontalHeader . setSectionResizeMode ( QHeaderView . Fixed ) horizontalHeader . customContextMenuRequested . connect ( self . bin_context_menu_opened ) verticalHeader = table . verticalHeader ( ) verticalHeader . setContextMenuPolicy ( Qt . CustomContextMenu ) verticalHeader . setSectionResizeMode ( QHeaderView . Fixed ) verticalHeader . customContextMenuRequested . connect ( self . spectra_context_menu_opened )