code: def cnsfix(args):
      
      from jcvi.formats.base import read_block
  
      p = OptionParser(cnsfix.__doc__)
      opts, args = p.parse_args(args)
  
      if len(args) != 1:
          sys.exit(not p.print_help())
  
      cnsfixout, = args
      fp = open(cnsfixout)
      utgs = []
      saves = []
      for header, contents in read_block(fp, "Evaluating"):
          contents = list(contents)
          utg = header.split()[2]
          utgs.append(utg)
          # Look for this line:
          #   save fragment idx=388 ident=206054426 for next pass
          for c in contents:
              if not c.startswith("save"):
                  continue
              ident = c.split()[3].split("=")[-1]
              saves.append(ident)
      print("\n".join(saves))
docs: %prog cnsfix consensus-fix.out.FAILED > blacklist.ids
  
      Parse consensus-fix.out to extract layouts for fixed unitigs. This will
      mark all the failed fragments detected by utgcnsfix and pop them out of the
      existing unitigs.