nodes: 0, module; 1, function_definition; 2, function_name:monotony; 3, parameters; 4, block; 5, identifier:seq; 6, expression_statement; 7, if_statement; 8, comment:"""Determine the monotony of a sequence
  
      :param seq: a sequence
  
      :returns: 1 if the sequence is sorted (increasing)
      :returns: 0 if it is not sorted
      :returns: -1 if it is sorted in reverse order (decreasing)
  
      >>> monotony([1, 2, 3])
      1
      >>> monotony([1, 3, 2])
      0
      >>> monotony([3, 2, 1])
      -1
  
      """; 9, comparison_operator:seq == sorted(seq); 10, block; 11, elif_clause; 12, else_clause; 13, identifier:seq; 14, call; 15, return_statement; 16, comparison_operator:seq == list(reversed(sorted(seq))); 17, block; 18, block; 19, identifier:sorted; 20, argument_list; 21, integer:1; 22, identifier:seq; 23, call; 24, return_statement; 25, return_statement; 26, identifier:seq; 27, identifier:list; 28, argument_list; 29, unary_operator; 30, integer:0; 31, call; 32, integer:1; 33, identifier:reversed; 34, argument_list; 35, call; 36, identifier:sorted; 37, argument_list; 38, identifier:seq
code: def monotony(seq):
      """Determine the monotony of a sequence
  
      :param seq: a sequence
  
      :returns: 1 if the sequence is sorted (increasing)
      :returns: 0 if it is not sorted
      :returns: -1 if it is sorted in reverse order (decreasing)
  
      >>> monotony([1, 2, 3])
      1
      >>> monotony([1, 3, 2])
      0
      >>> monotony([3, 2, 1])
      -1
  
      """
      if seq == sorted(seq):
          return 1
      elif seq == list(reversed(sorted(seq))):
          return -1
      else:
          return 0