code: def calc_point_dist_vary(mus1, fUpper1, mus2, fUpper2, fMap, norm_map, MMdistA):
      
      f_upper = min(fUpper1, fUpper2)
      f_other = max(fUpper1, fUpper2)
      idx = fMap[f_upper]
      vecs1 = mus1[idx]
      vecs2 = mus2[idx]
      val = ((vecs1 - vecs2)*(vecs1 - vecs2)).sum()
      if (val > MMdistA):
          return False
      # Reduce match to account for normalization.
      norm_fac = norm_map[f_upper] / norm_map[f_other]
      val = 1 - (1 - val)*norm_fac
      return (val < MMdistA)
docs: Function to determine if two points, with differing upper frequency cutoffs
      have a mismatch < MMdistA for *both* upper frequency cutoffs.
  
      Parameters
      ----------
      mus1 : List of numpy arrays
          mus1[i] will give the array of point 1's position in the \chi_j
          coordinate system. The i element corresponds to varying values of the
          upper frequency cutoff. fMap is used to map between i and actual
          frequencies
      fUpper1 : float
          The upper frequency cutoff of point 1.
      mus2 : List of numpy arrays
          mus2[i] will give the array of point 2's position in the \chi_j
          coordinate system. The i element corresponds to varying values of the
          upper frequency cutoff. fMap is used to map between i and actual
          frequencies
      fUpper2 : float
          The upper frequency cutoff of point 2.
      fMap : dictionary
          fMap[fUpper] will give the index needed to get the \chi_j coordinates
          in the two sets of mus
      norm_map : dictionary
          norm_map[fUpper] will give the relative frequency domain template
          amplitude (sigma) at the given value of fUpper.
      MMdistA
          The minimal mismatch allowed between the points
  
      Returns
      --------
      Boolean
          True if the points have a mismatch < MMdistA
          False if the points have a mismatch > MMdistA