code: def plot_phonemes(train_path, cmu_dict_path, save_path):
      cmudict = CMUDict(cmu_dict_path)
  
      phonemes = {}
  
      with open(train_path, "r") as f:
          data = csv.reader(f, delimiter="|")
          phonemes["None"] = 0
          for row in data:
              words = row[3].split()
              for word in words:
                  pho = cmudict.lookup(word)
                  if pho:
                      indie = pho[0].split()
                      for nemes in indie:
                          if phonemes.get(nemes):
                              phonemes[nemes] += 1
                          else:
                              phonemes[nemes] = 1
                  else:
                      phonemes["None"] += 1
  
      x, y = [], []
      for key in phonemes:
          x.append(key)
          y.append(phonemes[key])
  
      plt.figure()
      plt.rcParams["figure.figsize"] = (50, 20)
      barplot = sns.barplot(x, y)
      if save_path:
          fig = barplot.get_figure()
          fig.savefig(os.path.join(save_path, "phoneme_dist"))
  
file_path: TTS/notebooks/dataset_analysis/analyze.py
imports: import matplotlib.pyplot
  from statistics import stdev, mode, mean, median
  from statistics import StatisticsError
  import argparse
  import os
  import csv
  import seaborn
  import random
  from text.cmudict import CMUDict
label_desc: Use image node_id 7 for calling a global function with example usage: plot_phonemes(train_path, cmu_dict_path, save_path) without return types