code: def set_hover_props(self, b):
      props = self.hoverprops if b else self.props
      self.label.set(color=props.labelcolor)
      self.rect.set(facecolor=props.bgcolor, alpha=props.alpha)
  
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 5 for calling the MenuItem obj's underlying member method code with example usage: obj.set_hover_props(b) without return types