nodes: 0, module; 1, function_definition; 2, function_name:_adjust_prt_flds; 3, parameters; 4, block; 5, identifier:self; 6, identifier:kws_xlsx; 7, identifier:desc2nts; 8, identifier:shade_hdrgos; 9, expression_statement; 10, comment:# Use xlsx prt_flds from the user, if provided; 11, if_statement; 12, comment:# If the user did not provide specific fields to print in an xlsx file:; 13, expression_statement; 14, comment:# Are we printing GO group headers?; 15, comment:# Build new list of xlsx print fields, excluding those which add no new information; 16, expression_statement; 17, comment:# Get all namedtuple fields; 18, expression_statement; 19, comment:# Keep fields intended for print and optionally gray-shade field (format_txt); 20, comment:# print('FFFFFFFFFFFFFFF WrXlsxSortedGos::_adjust_prt_flds:', nt_flds); 21, for_statement; 22, expression_statement; 23, comment:"""Print user-requested fields or provided fields minus info fields."""; 24, comparison_operator:"prt_flds" in kws_xlsx; 25, block; 26, assignment; 27, assignment; 28, assignment; 29, identifier:nt_fld; 30, identifier:nt_flds; 31, block; 32, assignment; 33, string:"prt_flds"; 34, identifier:kws_xlsx; 35, return_statement; 36, identifier:dont_print; 37, call; 38, identifier:prt_flds_adjusted; 39, list; 40, identifier:nt_flds; 41, call; 42, if_statement; 43, subscript; 44, identifier:prt_flds_adjusted; 45, subscript; 46, identifier:set; 47, argument_list; 48, attribute; 49, argument_list; 50, comparison_operator:nt_fld not in dont_print; 51, comment:# Only add grey-shade to hdrgo and section name rows if hdrgo_prt=True; 52, block; 53, identifier:kws_xlsx; 54, string; 55, identifier:kws_xlsx; 56, string:"prt_flds"; 57, list; 58, attribute; 59, identifier:get_fields; 60, identifier:desc2nts; 61, identifier:nt_fld; 62, identifier:dont_print; 63, if_statement; 64, string_content:prt_flds; 65, string; 66, string; 67, string; 68, identifier:self; 69, identifier:sortobj; 70, comparison_operator:nt_fld == "format_txt"; 71, block; 72, else_clause; 73, string_content:hdr_idx; 74, string_content:is_hdrgo; 75, string_content:is_usrgo; 76, identifier:nt_fld; 77, string:"format_txt"; 78, if_statement; 79, block; 80, comparison_operator:shade_hdrgos is True; 81, block; 82, expression_statement; 83, identifier:shade_hdrgos; 84, True; 85, expression_statement; 86, call; 87, call; 88, attribute; 89, argument_list; 90, attribute; 91, argument_list; 92, identifier:prt_flds_adjusted; 93, identifier:append; 94, identifier:nt_fld; 95, identifier:prt_flds_adjusted; 96, identifier:append; 97, identifier:nt_fld
code: def _adjust_prt_flds(self, kws_xlsx, desc2nts, shade_hdrgos):
          """Print user-requested fields or provided fields minus info fields."""
          # Use xlsx prt_flds from the user, if provided
          if "prt_flds" in kws_xlsx:
              return kws_xlsx["prt_flds"]
          # If the user did not provide specific fields to print in an xlsx file:
          dont_print = set(['hdr_idx', 'is_hdrgo', 'is_usrgo'])
          # Are we printing GO group headers?
          # Build new list of xlsx print fields, excluding those which add no new information
          prt_flds_adjusted = []
          # Get all namedtuple fields
          nt_flds = self.sortobj.get_fields(desc2nts)
          # Keep fields intended for print and optionally gray-shade field (format_txt)
          # print('FFFFFFFFFFFFFFF WrXlsxSortedGos::_adjust_prt_flds:', nt_flds)
          for nt_fld in nt_flds:
              if nt_fld not in dont_print:
                  # Only add grey-shade to hdrgo and section name rows if hdrgo_prt=True
                  if nt_fld == "format_txt":
                      if shade_hdrgos is True:
                          prt_flds_adjusted.append(nt_fld)
                  else:
                      prt_flds_adjusted.append(nt_fld)
          kws_xlsx['prt_flds'] = prt_flds_adjusted