code: def _formatSequence(tokens, categories, seqID, uniqueID):
      
      record = {"_category":categories,
                "_sequenceId":seqID}
      data = []
      reset = 1
      for t in tokens:
        tokenRecord = record.copy()
        tokenRecord["_token"] = t
        tokenRecord["_reset"] = reset
        tokenRecord["ID"] = uniqueID
        reset = 0
        data.append(tokenRecord)
  
      return data
docs: Write the sequence of data records for this sample.