def extract_from_list(var):
    """ Extract name, min, mean and max from a list

    Args:
        var (list): List in a format like ['x', -1, 1] or (-2, 0, 3)

    Returns:
        name, value, min, max

    """
    var = list(var)
    name = val = lwb = upb = None

    assert len(var) >= 2, "Please use a format like ['x', -1, 1] or (-2, 0, 3)"

    if isinstance(var[0], str):
        name = var[0]
        var = var[1:]
    var = sorted(var)
    if len(var) == 2:
        lwb, upb = var
        val = lwb+upb
        val /= 2.
    if len(var) == 3:
        lwb, val, upb = var

    return name, val, lwb, upb