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

    """Finds the unit (block, module, whatever the terminology is) with the given
    url in the course tree and returns the unit.  Raises DashboardError if no
    unit is found.
    """
    def find(node, url):
        '\n                                Find    node    in    course    tree    for    url.\n                                '
        if (node.location.to_deprecated_string() == url):
            return node
        for child in node.get_children():
            found = find(child, url)
            if found:
                return found
        return None
    unit = find(course, url)
    if (unit is None):
        raise DashboardError(_("Couldn't    find    module    for    url:    {0}").format(url))
    return unit