<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def emitFragment(fw, fragID, libID, shredded_seq, clr=None, qvchar='l', fasta=False):
 """ Print out the shredded sequence. """

    if fasta:
        s = SeqRecord(shredded_seq, id=fragID, description="")
        SeqIO.write([s], fw, "fasta")
        return

    seq = str(shredded_seq)
    slen = len(seq)
    qvs = qvchar * slen  # shredded reads have default low qv

    if clr is None:
        clr_beg, clr_end = 0, slen
    else:
        clr_beg, clr_end = clr

    print(frgTemplate.format(fragID=fragID, libID=libID,
        seq=seq, qvs=qvs, clr_beg=clr_beg, clr_end=clr_end), file=fw)