def METHOD_NAME(spec):
    out = []   # will return a list of tuples (min, max) for each layer
    if not spec:
        return out
    for ilevel, level in enumerate(spec.split('/')):
        if not level:
            continue
        minmax = level.split('-')
        if len(minmax) == 1:  # only abs number specified
            minmax = int(minmax[0])
            min_, max_ = (minmax, minmax)
        elif len(minmax) == 2:
            min_, max_ = minmax
            if not min_:  # might be omitted entirely
                min_ = 0
            if not max_:
                raise ValueError("Specify max number at level %d. Full spec was: %s"
                                 % (ilevel, spec))
            min_ = int(min_)
            max_ = int(max_)
        else:
            raise ValueError("Must have only min-max at level %d" % ilevel)
        out.append((min_, max_))
    return out