import difflib


def SimularityScoreCalculate(field_instanceName: str = '', itemOfInterest: str = ''):
    """
    Function to compute the distance simularity score between two candidates.
    Args:
        field_instanceName: Candidate
        itemOfInterest: query

    Returns: Float score [0.0 not similar, 1.0 exact match]

    """
    if (isinstance(field_instanceName, str) is False) or ((isinstance(itemOfInterest, str) is False)):
        simularityScore = 0.0
    else:
        simularityScore = difflib.SequenceMatcher(None, field_instanceName, itemOfInterest).ratio()
    return simularityScore