code: def parse_masked(seq, min_len):
      
      nm, masked = [], [[]]
      prev = None
      for base in seq[1]:
          if base.isupper():
              nm.append(base)
              if masked != [[]] and len(masked[-1]) < min_len:
                  nm.extend(masked[-1])
                  del masked[-1]
              prev = False
          elif base.islower():
              if prev is False:
                  masked.append([])
              masked[-1].append(base)
              prev = True
      return nm, masked
docs: parse masked sequence into non-masked and masked regions