code: def copy(self):
          
          # copied from pyqtgraph ViewBoxMenu
          m = QtGui.QMenu()
          for sm in self.subMenus():
              if isinstance(sm, QtGui.QMenu):
                  m.addMenu(sm)
              else:
                  m.addAction(sm)
          m.setTitle(self.title())
          return m
docs: Adds menus to itself, required by ViewBox