code: def plot_scalemid_seq_dist(pre, gt, seqnames, num_seq=3):
      pre, gt = np.array(pre).reshape(-1), np.array(gt).reshape(-1)
      seqnames = np.array(seqnames)
      unique_seqnames = np.unique(seqnames).tolist()
      random.shuffle(unique_seqnames)
      fig, axes = plt.subplots(1, num_seq, figsize=(6 * num_seq, 6))
      for idx, (uname, ax) in enumerate(zip(unique_seqnames, axes)):
          if idx == num_seq:
              break
          mask = np.nonzero(seqnames == uname)[0]
          pre_ = pre[mask]
          gt_ = gt[mask]
          sns.distplot(pre_, ax=ax, label="pre")
          sns.distplot(gt_, ax=ax, label="gt")
          ax.set_xlabel("scale_mid", fontsize=11)
          ax.set_ylabel("prob", fontsize=11)
          ax.set_title(f"sequence {idx}")
          ax.legend()
      name = str(time.time()).replace(".", "0") + ".png"
      plt.savefig(name)
      img = imread(name)
      os.remove(name)
      return img
  
file_path: insightface/body/human_pose/ambiguity_aware/lib/utils/vis.py
imports: import os
  import time
  import random
  import numpy
  import matplotlib
  import matplotlib.pyplot
  import seaborn
  from imageio import imread
  from mpl_toolkits.mplot3d import Axes3D
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: plot_scalemid_seq_dist(pre, gt, seqnames, num_seq) and returns: img