def generateHubSequences(nCoinc=<NUM_LIT:10>, hubs = [<NUM_LIT:2>,<NUM_LIT:6>], seqLength=[<NUM_LIT:5>,<NUM_LIT:6>,<NUM_LIT:7>], nSeq=<NUM_LIT:100>):
coincList = list(range(nCoinc))<EOL>for hub in hubs:<EOL><INDENT>coincList.remove(hub)<EOL><DEDENT>seqList = []<EOL>for i in range(nSeq):<EOL><INDENT>length = random.choice(seqLength)-<NUM_LIT:1><EOL>seq = random.sample(coincList,length)<EOL>seq.insert(length//<NUM_LIT:2>, random.choice(hubs))<EOL>seqList.append(seq)<EOL><DEDENT>return seqList<EOL>
Generate a set of hub sequences. These are sequences which contain a hub
element in the middle. The elements of the sequences will be integers
from 0 to 'nCoinc'-1. The hub elements will only appear in the middle of
each sequence. The length of each sequence will be randomly chosen from the
'seqLength' list.

Parameters:
-----------------------------------------------
nCoinc:        the number of elements available to use in the sequences
hubs:          which of the elements will be used as hubs.
seqLength:     a list of possible sequence lengths. The length of each
                      sequence will be randomly chosen from here.
nSeq:          The number of sequences to generate

retval:        a list of sequences. Each sequence is itself a list
              containing the coincidence indices for that sequence.