def merge_ranges(ranges):
    """
    Merge variables data range in a list to return a range of minimal min range
    value and maximal max range value extended of 10% for keeping a padding
    around graph in canvas
    @param ranges: [(range_min_value, range_max_value),...]
    @return: merged_range_min_value, merged_range_max_value
    """
    min_value = max_value = None
    for range_min, range_max in ranges:
        if min_value is None:
            min_value = range_min
        elif range_min is not None:
            min_value = min(min_value, range_min)
        if max_value is None:
            max_value = range_max
        elif range_min is not None:
            max_value = max(max_value, range_max)
    if min_value is not None and max_value is not None:
        center = (min_value + max_value) / 2.0
        range_size = max(1.0, max_value - min_value)
    else:
        center = 0.5
        range_size = 1.0
    return center - range_size * 0.55, center + range_size * 0.55
