code: def append_data_statistics(meta_data):
      # get data statistics
      for char_cnt in meta_data:
          data = meta_data[char_cnt]["data"]
          audio_len_list = [d["audio_len"] for d in data]
          mean_audio_len = mean(audio_len_list)
          try:
              mode_audio_list = [round(d["audio_len"], 2) for d in data]
              mode_audio_len = mode(mode_audio_list)
          except StatisticsError:
              mode_audio_len = audio_len_list[0]
          median_audio_len = median(audio_len_list)
  
          try:
              std = stdev(d["audio_len"] for d in data)
          except StatisticsError:
              std = 0
  
          meta_data[char_cnt]["mean"] = mean_audio_len
          meta_data[char_cnt]["median"] = median_audio_len
          meta_data[char_cnt]["mode"] = mode_audio_len
          meta_data[char_cnt]["std"] = std
      return meta_data
  
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 2 for calling a global function with example usage: append_data_statistics(meta_data) and returns: meta_data