<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_participants_for_section(section, person=None):
 """ Returns a list of gradebook participants for the passed section and person. """

    section_label = encode_section_label(section.section_label())
    url = "/rest/gradebook/v1/section/{}/participants".format(section_label)
    headers = {}

    if person is not None:
        headers["X-UW-Act-as"] = person.uwnetid

    data = get_resource(url, headers)

    participants = []
    for pt in data["participants"]:
        participants.append(_participant_from_json(pt))

    return participants