nodes: 0, module; 1, function_definition; 2, function_name:_init_hdrgo_sortby; 3, parameters; 4, block; 5, identifier:self; 6, identifier:hdrgo_sortby; 7, identifier:sortby; 8, expression_statement; 9, if_statement; 10, if_statement; 11, return_statement; 12, comment:"""Initialize header sort function."""; 13, comparison_operator:hdrgo_sortby is not None; 14, block; 15, comparison_operator:sortby is not None; 16, block; 17, attribute; 18, identifier:hdrgo_sortby; 19, None; 20, return_statement; 21, identifier:sortby; 22, None; 23, return_statement; 24, identifier:self; 25, identifier:sortby; 26, identifier:hdrgo_sortby; 27, identifier:sortby
code: def _init_hdrgo_sortby(self, hdrgo_sortby, sortby):
          """Initialize header sort function."""
          if hdrgo_sortby is not None:
              return hdrgo_sortby
          if sortby is not None:
              return sortby
          return self.sortby