<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _mmUpdateDutyCycles(self):
 """ Update the duty cycle variables internally tracked by the TM mixin. """

    period = self.getDutyCyclePeriod()

    unionSDRArray = numpy.zeros(self.getNumColumns())
    unionSDRArray[list(self._mmTraces["unionSDR"].data[-1])] = 1

    self._mmData["unionSDRDutyCycle"] = \
      UnionTemporalPoolerMonitorMixin._mmUpdateDutyCyclesHelper(
        self._mmData["unionSDRDutyCycle"], unionSDRArray, period)

    self._mmData["persistenceDutyCycle"] = \
      UnionTemporalPoolerMonitorMixin._mmUpdateDutyCyclesHelper(
        self._mmData["persistenceDutyCycle"], self._poolingActivation, period)