def METHOD_NAME(self, name, submenu=None):
    """Loads the named Panel.
    The name consists of a module name and the class name of the Panel
    subclass to instantiate.
    The instance is saved in an attribute 'name', with dots and the class
    name removed. So if you call self.loadTool("foo.bar.FooBar"), you can
    find the instantiated FooBar panel in the 'foobar' attribute.
    """
    module_name, class_name = name.rsplit('.', 1)
    __import__(module_name)
    module = sys.modules[module_name]
    attribute_name = module_name.split('.')[-1] if "viewers" in name else module_name.replace('.', '')
    cls = vars(module)[class_name]
    panel = cls(self.mainwindow())
    self._panels.append((attribute_name, panel))
    setattr(self, attribute_name, panel)
    if submenu:
        self._submenus[submenu]['panels'].append(panel)