<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def subSampleWholeColumn(spikeTrains, colIndices, cellsPerColumn, currentTS, timeWindow):
 """ Obtains subsample from matrix of spike trains by considering the cells in columns specified by colIndices. Thus, it returns a matrix of spike trains of cells within the same column. @param spikeTrains (array) array containing the spike trains of cells in the TM @param colIndices (array) array containing the indices of columns whose spike trains should be sampled @param cellsPerColumn (int) number of cells per column in the TM @param currentTS (int) time-step upper bound of sample (sample will go from time-step 0 up to currentTS) @param timeWindow (int) number of time-steps to sample from the spike trains @return subSpikeTrains (array) spike train matrix sampled from the total spike train matrix """

  numColumns = np.shape(colIndices)[0]
  numCells = numColumns * cellsPerColumn

  if currentTS > 0 and currentTS < timeWindow:
    subSpikeTrains = np.zeros((numCells, currentTS), dtype = "uint32")
    for i in range(numColumns):
      currentCol = colIndices[i]
      initialCell = cellsPerColumn * currentCol
      for j in range(cellsPerColumn):
        subSpikeTrains[(cellsPerColumn*i) + j,:] = spikeTrains[initialCell + j,:]
  elif currentTS > 0 and currentTS >= timeWindow:
    subSpikeTrains = np.zeros((numCells, timeWindow), dtype = "uint32")
    for i in range(numColumns):
      currentCol = colIndices[i]
      initialCell = cellsPerColumn * currentCol
      for j in range(cellsPerColumn):
        subSpikeTrains[(cellsPerColumn*i) + j,:] = spikeTrains[initialCell + j,(currentTS-timeWindow):currentTS]
  elif currentTS == 0:
    # This option takes the whole spike train history
    totalTS = np.shape(spikeTrains)[1]
    subSpikeTrains = np.zeros((numCells, totalTS), dtype = "uint32")
    for i in range(numColumns):
      currentCol = colIndices[i]
      initialCell = cellsPerColumn * currentCol
      for j in range(cellsPerColumn):
        subSpikeTrains[(cellsPerColumn*i) + j,:] = spikeTrains[initialCell + j,:]
  elif currentTS < 0:
    totalTS = np.shape(spikeTrains)[1]
    subSpikeTrains = np.zeros((numCells, timeWindow), dtype = "uint32")
    rnd = random.randrange(totalTS - timeWindow)
    print "Starting from timestep: " + str(rnd)
    for i in range(numColumns):
      currentCol = colIndices[i]
      initialCell = cellsPerColumn * currentCol
      for j in range(cellsPerColumn):
        subSpikeTrains[(cellsPerColumn*i) + j,:] = spikeTrains[initialCell + j,rnd:(rnd+timeWindow)]
    
  return subSpikeTrains