<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _setLearningMode(self, l4Learning = False, l2Learning=False):
 """ Sets the learning mode for L4 and L2. """

    for column in self.L4Columns:
      column.setParameter("learn", 0, l4Learning)
    for column in self.L2Columns:
      column.setParameter("learningMode", 0, l2Learning)