def sort_by_visibility(objs: list) -> list:
    """
    Sort a list of object by their visibility value (decreasing).

    """
    s = True
    while s:
        s = False
        for i in range(len(objs) - 1, 0, -1):
            if objs[i].get_visibility_value() > objs[i - 1].get_visibility_value():
                # Swap the elements
                objs[i], objs[i - 1] = objs[i - 1], objs[i]
                # Set the flag to True so we'll loop again
                s = True

    return objs