<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_context_menu(self, qpoint):
 """ override this method to customize the context menu """

        menu = QMenu(self)
        index = self.view.indexAt(qpoint)

        def add_action(menu, text, handler, icon=None):
            a = None
            if icon is None:
                a = QAction(text, self)
            else:
                a = QAction(icon, text, self)
            a.triggered.connect(handler)
            menu.addAction(a)

        add_action(menu, "Color selection", self._handle_color_selection)

        # duplication here with vstructui
        color_menu = menu.addMenu("Color selection...")

        # need to escape the closure capture on the color loop variable below
        # hint from: http://stackoverflow.com/a/6035865/87207
        def make_color_selection_handler(color):
            return lambda: self._handle_color_selection(color=color)

        for color in QT_COLORS:
            add_action(color_menu, "{:s}".format(color.name),
                       make_color_selection_handler(color.qcolor), make_color_icon(color.qcolor))

        start = self._hsm.start
        end = self._hsm.end
        cm = self.getColorModel()
        if (start == end and cm.is_index_colored(start)) or cm.is_region_colored(start, end):
            def make_remove_color_handler(r):
                return lambda: self._handle_remove_color_range(r)

            remove_color_menu = menu.addMenu("Remove color...")
            for cr in cm.get_region_colors(start, end):
                pixmap = QPixmap(10, 10)
                pixmap.fill(cr.color)
                icon = QIcon(pixmap)
                add_action(remove_color_menu,
                       "Remove color [{:s}, {:s}], len: {:s}".format(h(cr.begin), h(cr.end), h(cr.end - cr.begin)),
                       make_remove_color_handler(cr), make_color_icon(cr.color))

        menu.addSeparator()  # -----------------------------------------------------------------

        add_action(menu, "Copy selection (binary)", self._handle_copy_binary)
        copy_menu = menu.addMenu("Copy...")
        add_action(copy_menu, "Copy selection (binary)", self._handle_copy_binary)
        add_action(copy_menu, "Copy selection (text)", self._handle_copy_text)
        add_action(copy_menu, "Copy selection (hex)", self._handle_copy_hex)
        add_action(copy_menu, "Copy selection (hexdump)", self._handle_copy_hexdump)
        add_action(copy_menu, "Copy selection (base64)", self._handle_copy_base64)

        menu.addSeparator()  # -----------------------------------------------------------------

        add_action(menu, "Add origin", lambda: self._handle_add_origin(index))
        return menu