<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def period_break(dates, period):
 """ Returns the indices where the given period changes. Parameters dates : PeriodIndex Array of intervals to monitor. period : string Name of the period to monitor. """

    current = getattr(dates, period)
    previous = getattr(dates - 1 * dates.freq, period)
    return np.nonzero(current - previous)[0]