code: def ppc_stat_hist_plot(y_stats, yrep_stats, stat_name=None, **kwargs):
      """Create histogram plot comparing data to samples from posterior.
  
      Args:
        y_stats: float.
          Float representing statistic value of observed data.
        yrep_stats: np.ndarray.
          A 1-D NumPy array.
        stat_name: string.
          Optional string value for including statistic name in legend.
        **kwargs:
          Keyword arguments used by seaborn.distplot can be given to customize plot.
  
      Returns:
        matplotlib axes.
  
      #### Examples
  
      ```python
      import matplotlib.pyplot as plt
  
      # DATA
      x_data = np.array([0, 1, 0, 0, 0, 0, 0, 0, 0, 1])
  
      # MODEL
      p = Beta(1.0, 1.0)
      x = Bernoulli(probs=p, sample_shape=10)
  
      # INFERENCE
      qp = Beta(tf.nn.softplus(tf.Variable(tf.random_normal([]))),
                tf.nn.softplus(tf.Variable(tf.random_normal([]))))
  
      inference = ed.KLqp({p: qp}, data={x: x_data})
      inference.run(n_iter=500)
  
      # CRITICISM
      x_post = ed.copy(x, {p: qp})
      y_rep, y = ed.ppc(
          lambda xs, zs: tf.reduce_mean(tf.cast(xs[x_post], tf.float32)),
          data={x_post: x_data})
  
      ed.ppc_stat_hist_plot(
          y[0], y_rep, stat_name=r'$T \equiv$mean', bins=10)
      plt.show()
      ```
      """
      import matplotlib.pyplot as plt
      import seaborn as sns
  
      ax = sns.distplot(
          yrep_stats, kde=False, label=r"$T(y_{rep})$", **kwargs
      )
  
      max_value = ax.get_ylim()[1]
  
      plt.vlines(y_stats, ymin=0.0, ymax=max_value, label="T(y)")
  
      if stat_name is not None:
          plt.legend(title=stat_name)
      else:
          plt.legend()
  
      return ax
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
label_desc: Use image node_id 2 for calling a global function with example usage: ppc_stat_hist_plot(y_stats, yrep_stats, stat_name) and returns: ax