def METHOD_NAME(base_selftests=True, plugin_selftests=None):
    """
    Returns a test suite with all selftests found
    This includes tests on available optional plugins directories
    :param base_selftests: if the base selftests directory should be included
    :type base_selftests: bool
    :param plugin_selftests: the list optional plugin directories to include
                             or None to include all
    :type plugin_selftests: list or None
    :rtype: unittest.TestSuite
    """
    suite = unittest.TestSuite()
    loader = unittest.TestLoader()
    selftests_dir = os.path.dirname(os.path.abspath(__file__))
    basedir = os.path.dirname(selftests_dir)
    if base_selftests:
        for section in ("unit", "functional"):
            start_dir = os.path.join(selftests_dir, section)
            suite.addTests(loader.discover(start_dir=start_dir, top_level_dir=basedir))
    if plugin_selftests is None:
        plugin_selftests = list(PLUGINS.keys())
    for plugin_dir in plugin_selftests:
        plugin_name = PLUGINS.get(plugin_dir, None)
        if python_module_available(plugin_name):
            path = os.path.join(basedir, "optional_plugins", plugin_dir, "tests")
            suite.addTests(loader.discover(start_dir=path, top_level_dir=path))
    return suite