def get_freq(freq):
 if isinstance(freq, compat.string_types):
  (base, mult) = get_freq_code(freq)
  freq = base
 return freq

def get_freq ( freq ) : if isinstance ( freq , compat . string_types ) : ( base , mult ) = get_freq_code ( freq ) freq = base return freq
return frequency code of given frequency str .