nodes: 0, module; 1, function_definition; 2, function_name:rowsBeforeItem; 3, parameters; 4, block; 5, identifier:self; 6, identifier:item; 7, identifier:count; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, expression_statement; 14, if_statement; 15, return_statement; 16, comment:"""
          The inverse of rowsAfterItem.
  
          @param item: then L{Item} to request rows before.
          @type item: this L{InequalityModel}'s L{itemType} attribute.
  
          @param count: The maximum number of rows to return.
          @type count: L{int}
  
          @return: A list of row data, ordered by the current sort column,
          beginning immediately after C{item}.
          """; 17, assignment; 18, assignment; 19, assignment; 20, assignment; 21, augmented_assignment; 22, identifier:count; 23, block; 24, subscript; 25, identifier:currentSortAttribute; 26, call; 27, identifier:value; 28, call; 29, identifier:firstQuery; 30, call; 31, identifier:results; 32, call; 33, identifier:count; 34, call; 35, expression_statement; 36, expression_statement; 37, identifier:results; 38, slice; 39, attribute; 40, argument_list; 41, attribute; 42, argument_list; 43, attribute; 44, argument_list; 45, attribute; 46, argument_list; 47, identifier:len; 48, argument_list; 49, assignment; 50, call; 51, unary_operator; 52, attribute; 53, identifier:sortAttribute; 54, identifier:currentSortAttribute; 55, identifier:__get__; 56, identifier:item; 57, call; 58, identifier:self; 59, identifier:inequalityQuery; 60, call; 61, identifier:count; 62, False; 63, identifier:self; 64, identifier:constructRows; 65, identifier:firstQuery; 66, identifier:results; 67, identifier:secondQuery; 68, call; 69, attribute; 70, argument_list; 71, integer:1; 72, identifier:self; 73, identifier:currentSortColumn; 74, identifier:type; 75, argument_list; 76, identifier:AND; 77, argument_list; 78, attribute; 79, argument_list; 80, identifier:results; 81, identifier:extend; 82, call; 83, identifier:item; 84, comparison_operator:currentSortAttribute == value; 85, comparison_operator:self.itemType.storeID < item.storeID; 86, identifier:self; 87, identifier:inequalityQuery; 88, comparison_operator:currentSortAttribute < value; 89, identifier:count; 90, False; 91, attribute; 92, argument_list; 93, identifier:currentSortAttribute; 94, identifier:value; 95, attribute; 96, attribute; 97, identifier:currentSortAttribute; 98, identifier:value; 99, identifier:self; 100, identifier:constructRows; 101, identifier:secondQuery; 102, attribute; 103, identifier:storeID; 104, identifier:item; 105, identifier:storeID; 106, identifier:self; 107, identifier:itemType
code: def rowsBeforeItem(self, item, count):
          """
          The inverse of rowsAfterItem.
  
          @param item: then L{Item} to request rows before.
          @type item: this L{InequalityModel}'s L{itemType} attribute.
  
          @param count: The maximum number of rows to return.
          @type count: L{int}
  
          @return: A list of row data, ordered by the current sort column,
          beginning immediately after C{item}.
          """
          currentSortAttribute = self.currentSortColumn.sortAttribute()
          value = currentSortAttribute.__get__(item, type(item))
          firstQuery = self.inequalityQuery(
              AND(currentSortAttribute == value,
                  self.itemType.storeID < item.storeID),
              count, False)
          results = self.constructRows(firstQuery)
          count -= len(results)
          if count:
              secondQuery = self.inequalityQuery(currentSortAttribute < value,
                                                 count, False)
              results.extend(self.constructRows(secondQuery))
          return results[::-1]