def buildSequencePool(numSequences = <NUM_LIT:10>,<EOL>seqLen = [<NUM_LIT:2>,<NUM_LIT:3>,<NUM_LIT:4>],<EOL>numPatterns = <NUM_LIT:5>,<EOL>numOnBitsPerPattern = <NUM_LIT:3>,<EOL>patternOverlap = <NUM_LIT:0>,<EOL>**kwargs<EOL>):
<EOL>patterns = getSimplePatterns(numOnBitsPerPattern, numPatterns, patternOverlap)<EOL>numCols = len(patterns[<NUM_LIT:0>])<EOL>trainingSequences = []<EOL>for i in range(numSequences):<EOL><INDENT>sequence = []<EOL>length = random.choice(seqLen)<EOL>for j in range(length):<EOL><INDENT>patIdx = random.choice(range(numPatterns))<EOL>sequence.append(patterns[patIdx])<EOL><DEDENT>trainingSequences.append(sequence)<EOL><DEDENT>if VERBOSITY >= <NUM_LIT:3>:<EOL><INDENT>print("<STR_LIT>")<EOL>printAllTrainingSequences(trainingSequences)<EOL><DEDENT>return (numCols, trainingSequences)<EOL>
Create a bunch of sequences of various lengths, all built from
    a fixed set of patterns.

    Parameters:
    -----------------------------------------------------
    numSequences:         Number of training sequences to generate
    seqLen:               List of possible sequence lengths
    numPatterns:          How many possible patterns there are to use within
                            sequences
    numOnBitsPerPattern:  Number of ON bits in each TM input pattern
    patternOverlap:       Max number of bits of overlap between any 2 patterns
    retval:               (numCols, trainingSequences)
                            numCols - width of the patterns
                            trainingSequences - a list of training sequences