code: def embedding_distance(tracks, detections, metric="euclidean"):
      """
      Compute cost based on features between two list[STrack].
      """
      cost_matrix = np.zeros(
          (len(tracks), len(detections)), dtype=np.float
      )
      if cost_matrix.size == 0:
          return cost_matrix
      det_features = np.asarray(
          [track.curr_feat for track in detections], dtype=np.float
      )
      track_features = np.asarray(
          [track.smooth_feat for track in tracks], dtype=np.float
      )
      cost_matrix = np.maximum(
          0.0, cdist(track_features, det_features, metric)
      )  # Nomalized features
      return cost_matrix
  
file_path: PaddleHub/modules/video/multiple_object_tracking/fairmot_dla34/modeling/mot/matching/jde_matching.py
imports: import scipy
  import numpy
  from scipy.spatial.distance import cdist
  from ..motion import kalman_filter
  import warnings
label_desc: Use image node_id 5 for calling a global function with example usage: embedding_distance(tracks, detections, metric) and returns: cost_matrix, cost_matrix