<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def AddAccelerator(self, modifiers, key, action):
 """ Add an accelerator. Modifiers and key follow the same pattern as the list used to create wx.AcceleratorTable objects. """

 newId = wx.NewId()
 self.Bind(wx.EVT_MENU, action, id = newId)
 self.RawAcceleratorTable.append((modifiers, key, newId))
 self.SetAcceleratorTable(wx.AcceleratorTable(self.RawAcceleratorTable))
 return newId