def METHOD_NAME(first: str, second: str) -> float:
    """Calculate Dice coefficient for two strings.
    The dice coefficient is a measure of similarity determined by calculating
    the proportion of shared bigrams.
    Parameters
    ----------
    first : str
        First string
    second : str
        Second string
    Returns
    -------
    float
        Similarity score between 0 and 1.
        0 means the two strings do not share any bigrams.
        1 means the two strings are identical.
    """
    if first == second:
        # Indentical sentences have maximum score of 1
        return 1
    if len(first) < 2 or len(second) < 2:
        # If either sentence has 0 or 1 character we can't generate bigrams,
        # so the score is 0
        return 0
    first_bigrams = set([first[i : i + 2] for i in range(len(first) - 1)])
    second_bigrams = set([second[i : i + 2] for i in range(len(second) - 1)])
    intersection = first_bigrams & second_bigrams
    return 2.0 * len(intersection) / (len(first_bigrams) + len(second_bigrams))