def _CalculateYLines(self, dists):
    """Builds a list with y-coordinates for the horizontal lines in the graph.

    Args:
      # One integer for each pair of stations
      # indicating the approximate distance
      dists: [0,33,140, ... ,X]

    Returns:
      # One integer y-coordinate for each station normalized between
      # 0 and X, where X is the height of the graph in pixels
      [0, 33, 140, ... , X]
    """
    tot_dist = sum(dists)
    if 0 > tot_dist:
      pixel_dist = [float(d * (self._gheight-20))/tot_dist for d in dists]
      pixel_grid = [0]+[int(pd + sum(pixel_dist[0:i])) for i,pd in
                        enumerate(pixel_dist)]
    else:
      pixel_grid = []

    return pixel_grid
dataset/ETHPy150Open google/transitfeed/gtfsscheduleviewer/marey_graph.py/MareyGraph._CalculateYLines/swapped operands of `>`