def get_all_plugintypes(plugins_param = ''):
    """
    Helper function to get list of unique plugin types
    
    Takes Plugin model queryset or peoduces own from 1 request if not provided.
    Returns list of cleared and unique plugins types used.
    """
    # init
    if plugins_param == '':
        plugins = Plugin.objects.all()
    else:
        plugins = plugins_param
    plugins_types_clean = []

    for plugin in plugins:
        plugin_temp = plugin.get_plugin()
        # appending all unique types to types list
        if not (plugin_temp.plugin_type in plugins_types_clean):
            plugins_types_clean.append(plugin_temp.plugin_type)
    return plugins_types_clean
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/apps/dms_plugins/representator.py/get_all_plugintypes/original