nodes: 0, module; 1, function_definition; 2, function_name:months_int; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, if_statement; 8, comment:"""A sorted list of months of the year in this analysis period as integers."""; 9, not_operator; 10, block; 11, else_clause; 12, attribute; 13, return_statement; 14, block; 15, identifier:self; 16, identifier:_is_reversed; 17, call; 18, expression_statement; 19, expression_statement; 20, return_statement; 21, identifier:list; 22, argument_list; 23, assignment; 24, assignment; 25, binary_operator:months_st + months_end; 26, call; 27, identifier:months_st; 28, call; 29, identifier:months_end; 30, call; 31, identifier:months_st; 32, identifier:months_end; 33, identifier:xrange; 34, argument_list; 35, identifier:list; 36, argument_list; 37, identifier:list; 38, argument_list; 39, attribute; 40, binary_operator:self.end_time.month + 1; 41, call; 42, call; 43, attribute; 44, identifier:month; 45, attribute; 46, integer:1; 47, identifier:xrange; 48, argument_list; 49, identifier:xrange; 50, argument_list; 51, identifier:self; 52, identifier:st_time; 53, attribute; 54, identifier:month; 55, attribute; 56, integer:13; 57, integer:1; 58, binary_operator:self.end_time.month + 1; 59, identifier:self; 60, identifier:end_time; 61, attribute; 62, identifier:month; 63, attribute; 64, integer:1; 65, identifier:self; 66, identifier:st_time; 67, attribute; 68, identifier:month; 69, identifier:self; 70, identifier:end_time
code: def months_int(self):
          """A sorted list of months of the year in this analysis period as integers."""
          if not self._is_reversed:
              return list(xrange(self.st_time.month, self.end_time.month + 1))
          else:
              months_st = list(xrange(self.st_time.month, 13))
              months_end = list(xrange(1, self.end_time.month + 1))
              return months_st + months_end