Returns a uw_sws.models.ClassSchedule object
    for the regid and term passed in.

def get_schedule_by_regid_and_term(regid, term,
                                   non_time_schedule_instructors=True,
                                   per_section_prefetch_callback=None,
                                   transcriptable_course="", **kwargs):
    """
    Returns a uw_sws.models.ClassSchedule object
    for the regid and term passed in.
    """

    if "include_instructor_not_on_time_schedule" in kwargs:
        include = kwargs["include_instructor_not_on_time_schedule"]
        non_time_schedule_instructors = include
    params = [
        ('reg_id', regid),
    ]

    if transcriptable_course != "":
        params.append(("transcriptable_course", transcriptable_course,))

    params.extend([
        ('quarter', term.quarter),
        ('is_active', 'true'),
        ('year', term.year),
    ])

    url = "{}?{}".format(registration_res_url_prefix, urlencode(params))

    return _json_to_schedule(get_resource(url), term, regid,
                             non_time_schedule_instructors,
                             per_section_prefetch_callback)