code: def check_select(self, event):
      over, _ = self.rect.contains(event)
      if not over:
          return
      if self.on_select is not None:
          self.on_select(self)
  
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 2 for calling the MenuItem obj's underlying member method code with example usage: obj.check_select(event) without return types