Gets the next section following section_id.

        Assumes that section list exists in taken and section_id is in section list.
        Assumes that Section parts only exist as children of Assessments
554734
def _get_next_assessment_section(self, assessment_section_id):
        
        if self._my_map['sections'][-1] == str(assessment_section_id):
            # section_id represents the last seen section
            section = self._get_assessment_section(assessment_section_id)
            next_part_id, level = get_next_part_id(section._assessment_part_id,
                                                   runtime=self._runtime,
                                                   proxy=self._proxy,
                                                   sequestered=True)  # Raises IllegalState
            next_section = self._create_section(next_part_id)
            self._my_map['sections'].append(str(next_section.get_id()))
            self._save()
            return next_section
        else:
            return self._get_assessment_section(
                Id(self._my_map['sections'][self._my_map['sections'].index(str(assessment_section_id)) + 1]))
244139
def next_sibling(self):
        
        if self.parent is None:
            return None

        # Can't use index(); we need to test by identity
        for i, child in enumerate(self.parent.children):
            if child is self:
                try:
                    return self.parent.children[i+1]
                except IndexError:
                    return None
14963
def _getSectionIds(self, server, sections):
        
        if not sections: return []
        # Get a list of all section ids for looking up each section.
        allSectionIds = {}
        machineIdentifier = server.machineIdentifier if isinstance(server, PlexServer) else server
        url = self.PLEXSERVERS.replace('{machineId}', machineIdentifier)
        data = self.query(url, self._session.get)
        for elem in data[0]:
            allSectionIds[elem.attrib.get('id', '').lower()] = elem.attrib.get('id')
            allSectionIds[elem.attrib.get('title', '').lower()] = elem.attrib.get('id')
            allSectionIds[elem.attrib.get('key', '').lower()] = elem.attrib.get('id')
        log.debug(allSectionIds)
        # Convert passed in section items to section ids from above lookup
        sectionIds = []
        for section in sections:
            sectionKey = section.key if isinstance(section, LibrarySection) else section
            sectionIds.append(allSectionIds[sectionKey.lower()])
        return sectionIds
637941
def section(self, resources):
        

        section = [p for p in self.parents(resources) if p.rtype == 'section']
        if section:
            return section[0]
        return None
1048786
def get_item_ids_for_assessment_part(self, assessment_part_id):
        """"""
        item_ids = []
        for question_map in self._my_map['questions']:
            if question_map['assessmentPartId'] == str(assessment_part_id):
                item_ids.append(Id(question_map['itemId']))
        return item_ids
442472
def get_sections(self, section_name):
        
        sections = []
        for timer in self.timers():
            for sect in timer.sections:
                if sect.name == section_name:
                    sections.append(sect)
                    break
            else:
                sections.append(AbinitTimerSection.fake())

        return sections
1316638
def _get_first_part_id(self, assessment_id):
        """"""
        if assessment_id not in self._first_part_index:
            self._first_part_index[assessment_id] = get_first_part_id_for_assessment(
                assessment_id,
                runtime=self._runtime,
                proxy=self._proxy,
                create=True,
                bank_id=self._catalog_id)
        return self._first_part_index[assessment_id]
1327097
def get_section_list_name(section):
    
    return get_course_list_name(section.curriculum_abbr,
                                section.course_number,
                                section.section_id,
                                section.term.quarter,
                                section.term.year)
841817
def _get_sorted_section(self, nts_section):
        """"""
        #pylint: disable=unnecessary-lambda
        if self.section_sortby is True:
            return sorted(nts_section, key=lambda nt: self.sortgos.usrgo_sortby(nt))
        if self.section_sortby is False or self.section_sortby is None:
            return nts_section
        # print('SORT GO IDS IN A SECTION')
        return sorted(nts_section, key=lambda nt: self.section_sortby(nt))
325637
def get_term_for_section(id, opts = {})
      data, _status_code, _headers = get_term_for_section_with_http_info(id, opts)
      return data
    end
699735
def _get_section(self, event):
        """"""
        sentence_id = event.get('sentence')
        section = None
        if sentence_id:
            qstr = "$.sentences.frames[(@.frame_id is \'%s\')]" % sentence_id
            res = self.tree.execute(qstr)
            if res:
                sentence_frame = list(res)[0]
                passage_id = sentence_frame.get('passage')
                if passage_id:
                    qstr = "$.sentences.frames[(@.frame_id is \'%s\')]" % \
                            passage_id
                    res = self.tree.execute(qstr)
                    if res:
                        passage_frame = list(res)[0]
                        section = passage_frame.get('section-id')
        # If the section is in the standard list, return as is
        if section in self._section_list:
            return section
        # Next, handle a few special cases that come up in practice
        elif section.startswith('fig'):
            return 'figure'
        elif section.startswith('supm'):
            return 'supplementary'
        elif section == 'article-title':
            return 'title'
        elif section in ['subjects|methods', 'methods|subjects']:
            return 'methods'
        elif section == 'conclusions':
            return 'conclusion'
        elif section == 'intro':
            return 'introduction'
        else:
            return None
981221
def get_first_part_id_for_assessment(assessment_id, runtime=None, proxy=None, create=False, bank_id=None):
    """"""
    if create and bank_id is None:
        raise NullArgument('Bank Id must be provided for create option')
    try:
        return get_next_part_id(assessment_id, runtime, proxy, sequestered=False)[0]
    except IllegalState:
        if create:
            return create_first_assessment_section(assessment_id, runtime, proxy, bank_id)
        else:
            raise
1120648
def _get_section(self, name, create=True):
        """"""
        try:
            return self.sections[name]
        except KeyError:
            if not create:
                raise

            section = Section(name)
            self.sections[name] = section
            return section
351548
def get_goids_sections(sections):
        """"""
        goids_all = set()
        for _, goids_sec in sections:
            goids_all |= set(goids_sec)
        return goids_all
762841
def get_section(id, opts = {})
      data, _status_code, _headers = get_section_with_http_info(id, opts)
      return data
    end
714549
def is_simple_section(self):
        """"""
        item_ids = self._get_assessment_part(self._assessment_part_id).get_item_ids()
        if item_ids.available():
            return True
        return False
855062
def get(self):
        
        section = {}
        if self.key is not None and self.value is not None:
            section[self.key] = self.value
        return section