code: def token_distance(t1, t2, initial_match_penalization):
      
      if isinstance(t1, NameInitial) or isinstance(t2, NameInitial):
          if t1.token == t2.token:
              return 0
          if t1 == t2:
              return initial_match_penalization
          return 1.0
      return _normalized_edit_dist(t1.token, t2.token)
docs: Calculates the edit distance between two tokens.