Build rrule dictionary for vRecur class from a dateutil rrule.

    Dateutils rrule is a popular implementation of rrule in python.
    https://pypi.org/project/python-dateutil/
    this is a shortcut to interface between dateutil and icalendar.

def build_rrule_from_dateutil_rrule(rule):
    """
    Build rrule dictionary for vRecur class from a dateutil rrule.

    Dateutils rrule is a popular implementation of rrule in python.
    https://pypi.org/project/python-dateutil/
    this is a shortcut to interface between dateutil and icalendar.
    """
    lines = str(rule).splitlines()
    for line in lines:
        if line.startswith('DTSTART:'):
            continue
        if line.startswith('RRULE:'):
            line = line[6:]
        return build_rrule_from_text(line)