code: def genome_lengths(fastas, info):
      
      if info is False:
          info = {}
      for genome in fastas:
          name = genome.rsplit('.', 1)[0].rsplit('/', 1)[-1].rsplit('.contigs')[0]
          if name in info:
              continue
          length = 0
          fragments = 0
          for seq in parse_fasta(genome):
              length += len(seq[1])
              fragments += 1
          info[name] = {'genome size (bp)':length, '# contigs':fragments}
      return info
docs: get genome lengths