import re


def _SplitFreqRange(freq_range):
  """Splits a `freq_range` str in a list of numerical (fmin, fmax) tuples."""
  try:
    fmin, fmax = re.split(',|-', freq_range.strip())
    return [(float(fmin), float(fmax))]
  except AttributeError:
    freq_ranges = []
    for one_range in freq_range:
      fmin, fmax = re.split(',|-', one_range.strip())
      freq_ranges.append((float(fmin), float(fmax)))
    return freq_ranges