Calculate the area with hist [ tp ] stack as smallest bar
if len ( s ) == 0 : NEW_LINE INDENT area_with_top = hist [ tp ] * i NEW_LINE DEDENT else : NEW_LINE INDENT area_with_top = hist [ tp ] * ( i - s [ - 1 ] - 1 ) NEW_LINE DEDENT