human
Complete the below
def get_units_with_due_date(course):

    ''''Returns all top level units which have due dates.  Does not return
    descendents of those nodes.'
    '''
 Can you provide a the Python program you requested?
assistant
#Here is the Python program you requested.
    units = []
    def visit(node):
        '\n                                Visit    a    node.        Checks    to    see    if    node    has    a    due    date    and    appends    to\n                                `units`    if    it    does.        Otherwise    recurses    into    children    to    search    for\n                                nodes    with    due    dates.\n                                '
        if getattr(node, 'due', None):
            units.append(node)
        else:
            for child in node.get_children():
                visit(child)
    visit(course)
    return units