def meta(str1, str2, ratios, weights):
    """A meta ratio function. Returns a weighted meta ratio.

    The Wiesendahl ratio is a meta ratio which combines a weighted
    ratio of given ratio functions.

    Args:

        str1   (str): first string
        str2   (str): second string
        ratios (list(function(str, str) -> float)): ratio functions
            This parameter is a list of ratio functions.
        weights (list(float)): list of weights
            Each weight gets applied to its corresponding function.

    Returns:
        float: the combined and weighted meta ratio

    """

    c = 0
    r = 0.0
    for i, fn in enumerate(ratios):
        r += fn(str1, str2) * weights[i]
        c += weights[i]

    return r / float(c)