def _find_compound_unit(numerator_unit, denominator_unit, locale=LC_NUMERIC):
 locale = Locale.parse(locale)
 numerator_unit = _find_unit_pattern(numerator_unit, locale=locale)
 denominator_unit = _find_unit_pattern(denominator_unit, locale=locale)
 if (not (numerator_unit and denominator_unit)):
  return None
 bare_numerator_unit = numerator_unit.split('-', 1)[(-1)]
 bare_denominator_unit = denominator_unit.split('-', 1)[(-1)]
 return _find_unit_pattern(('%s-per-%s' % (bare_numerator_unit, bare_denominator_unit)), locale=locale)

def _find_compound_unit ( numerator_unit , denominator_unit , locale = LC_NUMERIC ) : locale = Locale . parse ( locale ) numerator_unit = _find_unit_pattern ( numerator_unit , locale = locale ) denominator_unit = _find_unit_pattern ( denominator_unit , locale = locale ) if ( not ( numerator_unit and denominator_unit ) ) : return None bare_numerator_unit = numerator_unit . split ( '-' , 1 ) [ ( - 1 ) ] bare_denominator_unit = denominator_unit . split ( '-' , 1 ) [ ( - 1 ) ] return _find_unit_pattern ( ( '%s-per-%s' % ( bare_numerator_unit , bare_denominator_unit ) ) , locale = locale )
find a predefined compound unit pattern .