def get_priority(cls):
    """
    Returns the priority of a plugin.
    :param cls: class to get priority from
    :type cls: class
    :return: the priority of cls
    :rtype: int
    """
    if not hasattr(cls, "_plugin_priority"):
        return 0
    return cls._plugin_priority