<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def forwards_migration(apps, schema_editor):
 """ "0002_recurrence_rules" added malformed recurrence with trailing semi-colons. While the JS parser on the front-end handles them, the python parser will crash """

    RecurrenceRule = apps.get_model('icekit_events', 'RecurrenceRule')
    for rrule in RecurrenceRule.objects.all():
        if ';\n' in rrule.recurrence_rule:
            parts = rrule.recurrence_rule.split(';\n')
            rrule.recurrence_rule = '\n'.join(parts)
            rrule.save()