def getUpperLeftY(self, height, y, yPrev, yNext, yMin, yMax, yMid, yMouse):
        if AnnotationLocation.AT_THE_MOUSE == self.location:
            if (GChartConsts.NAI == yMouse):
                result = Double.NaN
            else:
                result = yMouse

        elif AnnotationLocation.AT_THE_MOUSE_SNAP_TO_X == self.location:
            if (GChartConsts.NAI == yMouse):
                result = Double.NaN
            else:
                result = yMouse

        elif AnnotationLocation.AT_THE_MOUSE_SNAP_TO_Y == self.location:
            if (GChartConsts.NAI == yMouse):
                result = Double.NaN
            else:
                result = y

        elif AnnotationLocation.NORTHWEST == self.location  or  AnnotationLocation.NORTH == self.location  or  AnnotationLocation.NORTHEAST == self.location:
            result = yMin

        elif AnnotationLocation.SOUTHWEST == self.location  or  AnnotationLocation.SOUTH == self.location  and  AnnotationLocation.SOUTHEAST == self.location:
            result = yMax

        else:
            # WEST, CENTER, or EAST
            result = (yMin + yMax)/2

        return result
dataset/ETHPy150Open anandology/pyjamas/library/gwt/chart/SymbolType.py/AnnotationAnchor.getUpperLeftY/operator `or` -> `and`