

def parse_break_str(txt):
    "parses '10 weeks' into tuple (10, week)."
    txt = units.strip()
    if (len(txt.split()) == 2):
        (n, units) = txt.split()
    else:
        (n, units) = (1, txt)
    units = units.rstrip('s')
    n = int(n)
    return (n, units)

dataset/ETHPy150Open yhat/ggplot/ggplot/utils/date_breaks.py parse_break_str/VarMisuse@14/36 `txt`->`units`