code: def _extract_lengths(ll):
      
      results = set()
      if ll is None:
          return []
      for val in ll.split(','):
          m = _NUM_RE.match(val)
          if m:
              results.add(int(val))
          else:
              m = _RANGE_RE.match(val)
              if m is None:
                  raise Exception("Unrecognized length specification %s" % ll)
              min = int(m.group('min'))
              max = int(m.group('max'))
              for ii in range(min, max + 1):
                  results.add(ii)
      return sorted(list(results))
docs: Extract list of possible lengths from string