def METHOD_NAME(self, base_dirs, plugin_path, attribute):
    for dir in base_dirs:
        dir = os.path.join(dir, plugin_path)
        if not os.path.exists(dir):
            continue
        sys.path.append(os.path.abspath(dir))
        for file in os.listdir(dir):
            if file[-2:] == 'py':
                module_name = file[:-3]
                try:
                    __import__(module_name)
                    # Search through the module and look for classes that
                    # have the passed in attribute, which should be a bool and be True
                    for name, obj in inspect.getmembers(sys.modules[module_name]):
                        if inspect.isclass(obj) and hasattr(obj, attribute):
                            at = getattr(obj, attribute)
                            if isinstance(at, bool) and at:
                                self.register(obj, name)
                except Exception as e:
                    print('\nERROR: Your Plugin Tester "' + module_name + '" failed to import. (skipping)\n\n' + str(e))