code: def jaro(str1: str, str2: str) -> float:
      """
      Measure the similarity between two strings using Jaro (*not* Jaro-Winkler) distance,
      which searches for common characters while taking transpositions and string lengths
      into account.
  
      Args:
          str1
          str2
  
      Returns:
          Similarity between ``str1`` and ``str2`` in the interval [0.0, 1.0],
          where larger values correspond to more similar strings
      """
      # NOTE: I usually try to avoid wrapping other packages' functionality in one-liners
      # but this is here for consistency with levenshtein and hamming,
      # which do extra work to get normalized similarity values
      shortcut = _shortcut(str1, str2)
      if shortcut:
          return shortcut
  
      return _jaro_similarity(str1, str2)
  
file_path: textacy/src/textacy/similarity/edits.py
imports: from __future__ import annotations
  from typing import Optional
  import sklearn.feature_extraction
  import sklearn.metrics
  from jellyfish import hamming_distance
  from jellyfish import jaro_similarity
  from jellyfish import levenshtein_distance
  from ..None import constants
label_desc: Use image node_id 4 for calling a global function with example usage: jaro(str1, str2) and returns: _jaro_similarity, shortcut