code: def set_extent(self, x, y, w, h, depth):
      self.rect.set(x=x, y=y, width=w, height=h)
      self.label.set(
          position=(x + self.padx, y + depth + self.pady / 2)
      )
      self.hover = False
  
file_path: matplotlib/galleries/examples/widgets/menu.py
imports: from dataclasses import dataclass
  import matplotlib.pyplot
  import matplotlib.artist
  import matplotlib.patches
  from matplotlib.typing import ColorType
label_desc: Use image node_id 3 for calling the MenuItem obj's underlying member method code with example usage: obj.set_extent(x, y, w, h, depth) without return types