code: def draw_peaks_inverted(self, x, peaks, line_color):
          
  
          y1 = self.image_height * 0.5 - peaks[0] * (self.image_height - 4) * 0.5
          y2 = self.image_height * 0.5 - peaks[1] * (self.image_height - 4) * 0.5
  
          if self.previous_y and x < self.image_width - 1:
              if y1 < y2:
                  self.draw.line((x, 0, x, y1), line_color)
                  self.draw.line((x, self.image_height, x, y2), line_color)
              else:
                  self.draw.line((x, 0, x, y2), line_color)
                  self.draw.line((x, self.image_height, x, y1), line_color)
          else:
              self.draw.line((x, 0, x, self.image_height), line_color)
          self.draw_anti_aliased_pixels(x, y1, y2, line_color)
          self.previous_x, self.previous_y = x, y1
docs: Draw 2 inverted peaks at x