code: def pool(args):
      
      from jcvi.formats.base import longest_unique_prefix
  
      p = OptionParser(pool.__doc__)
      p.add_option("--sep", default=".", help="Separator between prefix and name")
      p.add_option("--sequential", default=False, action="store_true",
              help="Add sequential IDs")
      opts, args = p.parse_args(args)
  
      if len(args) < 1:
          sys.exit(not p.print_help())
  
      for fastafile in args:
          pf = longest_unique_prefix(fastafile, args)
          print(fastafile, "=>", pf, file=sys.stderr)
          prefixopt = "--prefix={0}{1}".format(pf, opts.sep)
          format_args = [fastafile, "stdout", prefixopt]
          if opts.sequential:
              format_args += ["--sequential=replace"]
          format(format_args)
docs: %prog pool fastafiles > pool.fasta
  
      Pool a bunch of FASTA files, and add prefix to each record based on
      filenames. File names are simplified to longest unique prefix to avoid
      collisions after getting shortened.