code: def match(self, source_obj_features, target_obj_features):
          
          if not isinstance(source_obj_features, f.BagOfFeatures):
              raise ValueError('Must supply source bag of object features')
          if not isinstance(target_obj_features, f.BagOfFeatures):
              raise ValueError('Must supply target bag of object features')
  
          # source feature descriptors and keypoints
          source_descriptors = source_obj_features.descriptors
          target_descriptors = target_obj_features.descriptors
          source_keypoints = source_obj_features.keypoints
          target_keypoints = target_obj_features.keypoints
  
          #calculate distance between this model's descriptors and each of the other_model's descriptors
          dists = spatial.distance.cdist(source_descriptors, target_descriptors)
  
          #calculate the indices of the target_model that minimize the distance to the descriptors in this model
          source_closest_descriptors = dists.argmin(axis=1)
          target_closest_descriptors = dists.argmin(axis=0)
          match_indices = []
          source_matched_points = np.zeros((0,3))
          target_matched_points = np.zeros((0,3))
  
          #calculate which points/indices the closest descriptors correspond to
          for i, j in enumerate(source_closest_descriptors):
              # for now, only keep correspondences that are a 2-way match
              if target_closest_descriptors[j] == i:
                  match_indices.append(j)
                  source_matched_points = np.r_[source_matched_points, source_keypoints[i:i+1, :]]
                  target_matched_points = np.r_[target_matched_points, target_keypoints[j:j+1, :]]
              else:
                  match_indices.append(-1)
  
          return Correspondences(match_indices, source_matched_points, target_matched_points)
docs: Matches features between two graspable objects based on a full distance matrix.
  
          Parameters
          ----------
          source_obj_features : :obj:`BagOfFeatures`
              bag of the source objects features
          target_obj_features : :obj:`BagOfFeatures`
              bag of the target objects features
  
          Returns
          -------
          corrs : :obj:`Correspondences`
              the correspondences between source and target