code: def _best_match_syn(self, sx, sys, scope_map):
          
          SUBSTRING_WEIGHT = 0.2
          WBEST = None
          sbest = None
          sxv = self._standardize_label(sx.val)
          sxp = self._id_to_ontology(sx.class_id)
          for sy in sys:
              syv = self._standardize_label(sy.val)
              syp = self._id_to_ontology(sy.class_id)
              W = None
              if sxv == syv:
                  confidence = sx.confidence * sy.confidence
                  if sx.is_abbreviation() or sy.is_abbreviation:
                      confidence *= self._get_config_val(sxp, 'abbreviation_confidence', 0.5)
                      confidence *= self._get_config_val(syp, 'abbreviation_confidence', 0.5)
                  W = scope_map[sx.scope()][sy.scope()] + logit(confidence/2)
              elif sxv in syv:
                  W = np.array((-SUBSTRING_WEIGHT, SUBSTRING_WEIGHT, 0, 0))
              elif syv in sxv:
                  W = np.array((SUBSTRING_WEIGHT, -SUBSTRING_WEIGHT, 0, 0))
              if W is not None:
                  # The best match is determined by the highest magnitude weight
                  if WBEST is None or max(abs(W)) > max(abs(WBEST)):
                      WBEST = W
                      sbest = sy
          return WBEST, sbest
docs: The best match is determined by the highest magnitude weight