code: def _convert_distance_names_to_functions(distance):
      
      dist_out = _copy.deepcopy(distance)
  
      for i, d in enumerate(distance):
          _, dist, _ = d
          if isinstance(dist, str):
              try:
                  dist_out[i][1] = _tc.distances.__dict__[dist]
              except:
                  raise ValueError("Distance '{}' not recognized.".format(dist))
  
      return dist_out
docs: Convert function names in a composite distance function into function
      handles.