<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def learnL6Pattern(self, l6Pattern, cellsToLearnOn):
 """ Learn the given l6Pattern on TRN cell dendrites. The TRN cells to learn are given in cellsTeLearnOn. Each of these cells will learn this pattern on a single dendritic segment. :param l6Pattern: An SDR from L6. List of indices corresponding to L6 cells. :param cellsToLearnOn: Each cell index is (x,y) corresponding to the TRN cells that should learn this pattern. For each cell, create a new dendrite that stores this pattern. The SDR is stored on this dendrite """

    cellIndices = [self.trnCellIndex(x) for x in cellsToLearnOn]
    newSegments = self.trnConnections.createSegments(cellIndices)
    self.trnConnections.growSynapses(newSegments, l6Pattern, 1.0)