code: def compute_image(self, xlim, ylim):
      self.x = np.linspace(*xlim, self.width)
      self.y = np.linspace(*ylim, self.height).reshape(-1, 1)
      c = self.x + 1.0j * self.y
      threshold_time = np.zeros((self.height, self.width))
      z = np.zeros(threshold_time.shape, dtype=complex)
      mask = np.ones(threshold_time.shape, dtype=bool)
      for i in range(self.niter):
          z[mask] = z[mask] ** self.power + c[mask]
          mask = np.abs(z) < self.radius
          threshold_time += mask
      return threshold_time
  
file_path: matplotlib/galleries/examples/event_handling/viewlims.py
imports: import functools
  import matplotlib.pyplot
  import numpy
  from matplotlib.patches import Rectangle
label_desc: Use image node_id 2 for calling the MandelbrotDisplay obj's underlying member method code with example usage: obj.compute_image(xlim, ylim) and returns: threshold_time