This will return a list of methods that can be called to prefetch (in
    threads) content that would be fetched while building the section.

    This depends on a good cache backend.  Without that, this will just double
    the work that's needed :(

    Each method is identified by a key, so they can be deduped if multiple
    sections want the same data, such as a common instructor.

def get_prefetch_for_section_data(section_data):
    """
    This will return a list of methods that can be called to prefetch (in
    threads) content that would be fetched while building the section.

    This depends on a good cache backend.  Without that, this will just double
    the work that's needed :(

    Each method is identified by a key, so they can be deduped if multiple
    sections want the same data, such as a common instructor.
    """
    prefetch = []
    for meeting_data in section_data["Meetings"]:
        for instructor_data in meeting_data["Instructors"]:
            pdata = instructor_data["Person"]
            if "RegID" in pdata and pdata["RegID"] is not None:
                prefetch.append(["person-{}".format(pdata["RegID"]),
                                 generic_prefetch(UWPWS.get_person_by_regid,
                                                  [pdata["RegID"]])])

    return prefetch