def oozie_to_hue_frequency(frequency_string):
  """
  Get frequency number and units from frequency, which must be of the format
  "${coord:$unit($number)}".

  frequency units and number are just different parts of the EL function.

  Returns:
    A tuple of the frequency unit and number

  Raises:
    InvalidFrequency: If the `frequency_string` does not match the frequency pattern.
  """
  matches = re.match(FREQUENCY_REGEX, frequency_string)
  if matches:
    return matches.group('frequency_unit'), matches.group('frequency_number')
  else:
    raise InvalidFrequency(_('invalid frequency: %s') % frequency_string)
dataset/ETHPy150Open cloudera/hue/apps/oozie/src/oozie/utils.py/oozie_to_hue_frequency/original