code: def get_fragment_lengths(fastafile):
      
      fraglengths = {}
      for seq in SeqIO.parse(fastafile, "fasta"):
          fraglengths[seq.id] = len(seq)
      return fraglengths
docs: Returns dictionary of sequence fragment lengths, keyed by fragment ID.
  
      Biopython's SeqIO module is used to parse all sequences in the FASTA
      file.
  
      NOTE: ambiguity symbols are not discounted.