def __diff_strings(str1, str2):
    """
    Compare two strings and return the substrings where they differ
    (e.g. "ABC/def" and "ABC/ddd" would return "ef" and "dd")
    """
    len1 = len(str1)
    len2 = len(str2)
    minlen = min(len1, len2)

    diff = None
    for idx in range(minlen):
        if str1[idx] != str2[idx]:
            diff = idx
            break

    if diff is not None:
        return str1[diff-1:], str2[diff-1:]

    if len1 == len2:
        return "", ""

    return str1[minlen:], str2[minlen:]