nodes: 0, module; 1, function_definition; 2, function_name:_has_sorted_sa_indices; 3, parameters; 4, block; 5, identifier:s_indices; 6, identifier:a_indices; 7, expression_statement; 8, expression_statement; 9, for_statement; 10, return_statement; 11, comment:"""
      Check whether `s_indices` and `a_indices` are sorted in
      lexicographic order.
  
      Parameters
      ----------
      s_indices, a_indices : ndarray(ndim=1)
  
      Returns
      -------
      bool
          Whether `s_indices` and `a_indices` are sorted.
  
      """; 12, assignment; 13, identifier:i; 14, call; 15, block; 16, True; 17, identifier:L; 18, call; 19, identifier:range; 20, argument_list; 21, if_statement; 22, if_statement; 23, identifier:len; 24, argument_list; 25, binary_operator:L-1; 26, comparison_operator:s_indices[i] > s_indices[i+1]; 27, block; 28, comparison_operator:s_indices[i] == s_indices[i+1]; 29, block; 30, identifier:s_indices; 31, identifier:L; 32, integer:1; 33, subscript; 34, subscript; 35, return_statement; 36, subscript; 37, subscript; 38, if_statement; 39, identifier:s_indices; 40, identifier:i; 41, identifier:s_indices; 42, binary_operator:i+1; 43, False; 44, identifier:s_indices; 45, identifier:i; 46, identifier:s_indices; 47, binary_operator:i+1; 48, comparison_operator:a_indices[i] >= a_indices[i+1]; 49, block; 50, identifier:i; 51, integer:1; 52, identifier:i; 53, integer:1; 54, subscript; 55, subscript; 56, return_statement; 57, identifier:a_indices; 58, identifier:i; 59, identifier:a_indices; 60, binary_operator:i+1; 61, False; 62, identifier:i; 63, integer:1
code: def _has_sorted_sa_indices(s_indices, a_indices):
      """
      Check whether `s_indices` and `a_indices` are sorted in
      lexicographic order.
  
      Parameters
      ----------
      s_indices, a_indices : ndarray(ndim=1)
  
      Returns
      -------
      bool
          Whether `s_indices` and `a_indices` are sorted.
  
      """
      L = len(s_indices)
      for i in range(L-1):
          if s_indices[i] > s_indices[i+1]:
              return False
          if s_indices[i] == s_indices[i+1]:
              if a_indices[i] >= a_indices[i+1]:
                  return False
      return True