def record_summary(record, indent=" "):
    """Returns a concise summary of a SeqRecord object as a string"""
    if record.id == record.name:
        answer = "%sID and Name='%s',\n%sSeq='" % (indent, record.id, indent)
    else:
        answer = "%sID = '%s', Name='%s',\n%sSeq='" % (indent, record.id, record.name, indent)
    if record.seq is None:
        answer += "None"
    else:
        if len(record.seq) > 50:
            answer += record.seq[:40].tostring() + "..." + record.seq[-7:].tostring()
        else:
            answer += record.seq.tostring()
        answer += "', length=%i" % (len(record.seq))
    return answer