human
Complete this python program:
def get_ccx_schedule(course, ccx):
assistant
#Here is the Python code you requested.

    """Generate a JSON serializable CCX schedule.
    """
    def visit(node, depth=1):
        '\n                                Recursive    generator    function    which    yields    CCX    schedule    nodes.\n                                We    convert    dates    to    string    to    get    them    ready    for    use    by    the    js    date\n                                widgets,    which    use    text    inputs.\n                                Visits    students    visible    nodes    only;    nodes    children    of    hidden    ones\n                                are    skipped    as    well.\n\n                                Dates:\n                                Only    start    date    is    applicable    to    a    section.    If    ccx    coach    did    not    override    start    date    then\n                                getting    it    from    the    master    course.\n                                Both    start    and    due    dates    are    applicable    to    a    subsection    (aka    sequential).    If    ccx    coach    did    not    override\n                                these    dates    then    getting    these    dates    from    corresponding    subsection    in    master    course.\n                                Unit    inherits    start    date    and    due    date    from    its    subsection.    If    ccx    coach    did    not    override    these    dates\n                                then    getting    them    from    corresponding    subsection    in    master    course.\n                                '
        for child in node.get_children():
            if child.visible_to_staff_only:
                continue
            hidden = get_override_for_ccx(ccx, child, 'visible_to_staff_only', child.visible_to_staff_only)
            start = get_date(ccx, child, 'start')
            if (depth > 1):
                if (depth == 2):
                    due = get_date(ccx, child, 'due')
                elif (depth == 3):
                    due = get_date(ccx, child, 'due', node)
                   ...