code: def __init__(self, ax):
      # create the initial line
      self.ax = ax
      ax.xaxis.set_visible(False)
      ax.set_xlim([0, 7])
      ax.yaxis.set_visible(False)
      ax.set_ylim([-1, 1])
      pad_a_x = 0
      pad_b_x = 0.50
      pad_a_y = pad_b_y = 0.30
      pad_b_x += 6.3
  
      # pads
      (pA,) = self.ax.barh(
          pad_a_y,
          0.2,
          height=0.3,
          color="k",
          alpha=0.5,
          edgecolor="b",
          lw=2,
          label="Player B",
          animated=True,
      )
      (pB,) = self.ax.barh(
          pad_b_y,
          0.2,
          height=0.3,
          left=pad_b_x,
          color="k",
          alpha=0.5,
          edgecolor="r",
          lw=2,
          label="Player A",
          animated=True,
      )
  
      # distractors
      self.x = np.arange(0, 2.22 * np.pi, 0.01)
      (self.line,) = self.ax.plot(
          self.x, np.sin(self.x), "r", animated=True, lw=4
      )
      (self.line2,) = self.ax.plot(
          self.x, np.cos(self.x), "g", animated=True, lw=4
      )
      (self.line3,) = self.ax.plot(
          self.x, np.cos(self.x), "g", animated=True, lw=4
      )
      (self.line4,) = self.ax.plot(
          self.x, np.cos(self.x), "r", animated=True, lw=4
      )
  
      # center line
      (self.centerline,) = self.ax.plot(
          [3.5, 3.5], [1, -1], "k", alpha=0.5, animated=True, lw=8
      )
  
      # puck (s)
      self.puckdisp = self.ax.scatter(
          [1],
          [1],
          label="_nolegend_",
          s=200,
          c="g",
          alpha=0.9,
          animated=True,
      )
  
      self.canvas = self.ax.figure.canvas
      self.background = None
      self.cnt = 0
      self.distract = True
      self.res = 100.0
      self.on = False
      self.inst = True  # show instructions from the beginning
      self.pads = [
          Pad(pA, pad_a_x, pad_a_y),
          Pad(pB, pad_b_x, pad_b_y, "r"),
      ]
      self.pucks = []
      self.i = self.ax.annotate(
          instructions,
          (0.5, 0.5),
          name="monospace",
          verticalalignment="center",
          horizontalalignment="center",
          multialignment="left",
          xycoords="axes fraction",
          animated=False,
      )
      self.canvas.mpl_connect("key_press_event", self.on_key_press)
  
imports: import time
  import matplotlib.pyplot
  import numpy
  from numpy.random import randint, randn
  from matplotlib.font_manager import FontProperties
label_desc: Use image node_id 1 to create a new Game object  with example: obj = Game(ax)