def get_available_screens():
    """
    Gets the available screens in this package for dynamic instantiation.
    """
    ignore_list = ['__init__.py']
    screens = []
    for module in os.listdir(os.path.join(os.path.dirname(__file__))):
        if module in ignore_list or module[-3:] != '.py':
            continue
        module_name = module[:-3]
        m = __import__(module_name, globals(), locals())

        # loop module's classes in search for the ones inheriting Screenbase
        # and ignore name (no need) with underscore variable
        for name, obj in inspect.getmembers(m):
            if inspect.isclass(obj) and issubclass(obj, base.ScreenBase) \
                    and not name.endswith("Base"):
                screens.append(obj)

    # find plugins
    screens.extend(get_available_plugin_screens())

    return screens
dataset/ETHPy150Open brunobraga/termsaver/termsaverlib/screen/__init__.py/get_available_screens/original