def METHOD_NAME(branch, last_shipped_rev, cron_rev):
    """This method queries the hg.mozilla.org server and retrieves all the commits
    that have happened between `last_shipped_rev` and the `cron_rev`. Sorted
    decreasingly over time, it iterates through them and attempts to retrieve the
    first one that is important. If none found, it'll return None and the main
    function will make the task go green.
    """
    # TODO use redo here to automatically retry
    resp = requests.get(URL.format(branch=branch), params={"full": "1", "fromchange": last_shipped_rev, "tochange": cron_rev})
    pushlog = resp.json()
    # we strip out all the pushes that contain other branches' commits (e.g. relbranch)
    reversed_pushes = [pushlog[k] for k in sorted(pushlog.keys(), reverse=True) if pushlog[k]["changesets"][0]["branch"] == "default"]
    for push in reversed_pushes:
        push_importance = is_push_important(push)
        if push_importance == Importance.IMPORTANT:
            # Tell caller that we want to build.
            return push["changesets"][-1]["node"]
        if push_importance == Importance.SKIP:
            # Tell caller that we do not want to build.
            return None