def METHOD_NAME(self, itemID):
    # Scene
    if not itemID:
        # No scene context menu actions in this plugin
        return
    # Volume but not LabelMap
    pluginHandlerSingleton = slicer.qSlicerSubjectHierarchyPluginHandler.instance()
    if (pluginHandlerSingleton.pluginByName('Volumes').canOwnSubjectHierarchyItem(itemID)
            and not pluginHandlerSingleton.pluginByName('LabelMaps').canOwnSubjectHierarchyItem(itemID)):
        # Get current item
        currentItemID = pluginHandlerSingleton.currentItem()
        if not currentItemID:
            logging.error("Invalid current item")
            return
        self.segmentEditorAction.visible = True