def dis_func(func, str_1, str_2, is_lower=False):
    """Calculate distances

    Args:
        str_1 (str): string 1
        str_2 (str): string 2
        is_lower (bool, optional): lower two strings. Defaults to False.
        func ([type], optional): distance function. Defaults to jf.damerau_levenshtein_distance.

    Returns:
        float: distance
    """
    result = 0
    if str_1 and str_2 and len(str_1) and len(str_2):
        if is_lower:
            str_1 = str_1.lower()
            str_2 = str_2.lower()
        result = float(func(str_1, str_2))
    return result