docstr: Update the hover status of event and return whether it was changed.
docstr_tok: ["Update","the","hover","status","of","event","and","return","whether","it","was","changed","."]
code: def set_hover(self, event):
      """
      Update the hover status of event and return whether it was changed.
      """
      b, _ = self.rect.contains(event)
      changed = b != self.hover
      if changed:
          self.set_hover_props(b)
      self.hover = b
      return changed
  
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 6 for calling the MenuItem obj's underlying member method code with example usage: obj.set_hover(event) and returns: changed