code: def callback(label):
      ln = lines_by_label[label]
      ln.set_visible(not ln.get_visible())
      ln.figure.canvas.draw_idle()
  
imports: import matplotlib.pyplot
  import numpy
  from matplotlib.widgets import CheckButtons
label_desc: Use image node_id 1 for calling a global function with example usage: callback(label) without return types