nodes: 0, module; 1, function_definition; 2, function_name:_get_sorted_section; 3, parameters; 4, block; 5, identifier:self; 6, identifier:nts_section; 7, expression_statement; 8, comment:#pylint: disable=unnecessary-lambda; 9, if_statement; 10, if_statement; 11, comment:# print('SORT GO IDS IN A SECTION'); 12, return_statement; 13, comment:"""Sort GO IDs in each section, if requested by user."""; 14, comparison_operator:self.section_sortby is True; 15, block; 16, boolean_operator; 17, block; 18, call; 19, attribute; 20, True; 21, return_statement; 22, comparison_operator:self.section_sortby is False; 23, comparison_operator:self.section_sortby is None; 24, return_statement; 25, identifier:sorted; 26, argument_list; 27, identifier:self; 28, identifier:section_sortby; 29, call; 30, attribute; 31, False; 32, attribute; 33, None; 34, identifier:nts_section; 35, identifier:nts_section; 36, keyword_argument; 37, identifier:sorted; 38, argument_list; 39, identifier:self; 40, identifier:section_sortby; 41, identifier:self; 42, identifier:section_sortby; 43, identifier:key; 44, lambda; 45, identifier:nts_section; 46, keyword_argument; 47, lambda_parameters; 48, call; 49, identifier:key; 50, lambda; 51, identifier:nt; 52, attribute; 53, argument_list; 54, lambda_parameters; 55, call; 56, identifier:self; 57, identifier:section_sortby; 58, identifier:nt; 59, identifier:nt; 60, attribute; 61, argument_list; 62, attribute; 63, identifier:usrgo_sortby; 64, identifier:nt; 65, identifier:self; 66, identifier:sortgos
code: def _get_sorted_section(self, nts_section):
          """Sort GO IDs in each section, if requested by user."""
          #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))