code: def plot_weight_posteriors(names, qm_vals, qs_vals, fname):
      """Save a PNG plot with histograms of weight means and stddevs.
  
      Args:
        names: A Python `iterable` of `str` variable names.
          qm_vals: A Python `iterable`, the same length as `names`,
          whose elements are Numpy `array`s, of any shape, containing
          posterior means of weight varibles.
        qs_vals: A Python `iterable`, the same length as `names`,
          whose elements are Numpy `array`s, of any shape, containing
          posterior standard deviations of weight varibles.
        fname: Python `str` filename to save the plot to.
      """
      fig = figure.Figure(figsize=(6, 3))
      canvas = backend_agg.FigureCanvasAgg(fig)
  
      ax = fig.add_subplot(1, 2, 1)
      for n, qm in zip(names, qm_vals):
          sns.distplot(qm.reshape([-1]), ax=ax, label=n)
      ax.set_title("weight means")
      ax.set_xlim([-1.5, 1.5])
      ax.legend()
  
      ax = fig.add_subplot(1, 2, 2)
      for n, qs in zip(names, qs_vals):
          sns.distplot(qs.reshape([-1]), ax=ax)
      ax.set_title("weight stddevs")
      ax.set_xlim([0, 1.0])
  
      fig.tight_layout()
      canvas.print_figure(fname, format="png")
      print("saved {}".format(fname))
  
imports: import os
  import warnings
  from absl import app
  from absl import flags
  import matplotlib
  from matplotlib import figure
  from matplotlib.backends import backend_agg
  import numpy
  import tensorflow.compat.v2
  import tensorflow_probability
  from tensorflow_probability.python.internal import tf_keras
label_desc: Use image node_id 1 for calling a global function with example usage: plot_weight_posteriors(names, qm_vals, qs_vals, fname) without return types