code: def plot_db(archive):
      "plot cumulative average for sampled data in archive"
      import mystic.cache as mc
  
      db = mc.archive.read(archive, type=mc.archive.file_archive)
      xx = list(db.values())
      xtype = type(xx[-1])
      multi = hasattr(xtype, "__len__")
      import numpy as np
  
      xs = np.array(xx)
      var = xtype(np.nanvar(xs, axis=0)) if multi else np.nanvar(xs)
      if xs.ndim == 1:
          xs = np.atleast_2d(xs).T
      ys = np.arange(1, xs.shape[0] + 1)
      y_ = ys - np.cumsum(np.isnan(xs), axis=0).T  # nan-adjusted
      xs = (np.nancumsum(xs, axis=0).T / y_).T.tolist()
      del y_
      ave = xtype(xs[-1]) if multi else xs[-1][0]
      print(
          "%s: len = %s, ave = %s, var = %s"
          % (archive, len(db), ave, var)
      )
      import matplotlib.pyplot as plt
  
      if type(ave) is tuple:
          fig, axs = plt.subplots(len(ave))
          for i, ax in enumerate(axs):
              ax.plot(np.array(xs).T[i])
              ax.plot(np.array(xx).T[i], "x")
      else:
          fig, ax = plt.subplots(1)
          ax.plot(np.array(xs).reshape(-1))
          ax.plot(np.array(xx).reshape(-1), "x")
      plt.title(archive)
      plt.show()
  
label_desc: Use image node_id 1 for calling a global function with example usage: plot_db(archive) without return types