docstr: Save tags that have a png_ prefix (as images)
  and replace the meta tag with the file name
  :param metrics:
  :return:
docstr_tok: ["Save","tags","that","have","a","png_","prefix","(","as","images",")","and","replace","the","meta","tag","with","the","file","name",":","param","metrics",":",":","return",":"]
code: def __save_images(self, metrics):
      """
      Save tags that have a png_ prefix (as images)
      and replace the meta tag with the file name
      :param metrics:
      :return:
      """
      # iterate all metrics and find keys with a specific prefix
      for i, metric in enumerate(metrics):
          for k, v in metric.items():
              # if the prefix is a png, save the image and replace the value with the path
              img_extension = None
              img_extension = "png" if "png_" in k else img_extension
              img_extension = "jpg" if "jpg" in k else img_extension
              img_extension = "jpeg" if "jpeg" in k else img_extension
  
              if img_extension is not None:
                  # determine the file name
                  img_name = "_".join(k.split("_")[1:])
                  save_path = self.get_media_path(
                      self.name, self.version
                  )
                  save_path = "{}/{}_{}.{}".format(
                      save_path, img_name, i, img_extension
                  )
  
                  # save image to disk
                  if type(metric[k]) is not str:
                      imwrite(save_path, metric[k])
  
                  # replace the image in the metric with the file path
                  metric[k] = save_path
  
imports: import contextlib
  import json
  import os
  import shutil
  from datetime import datetime
  import numpy
  import pandas
  from imageio import imwrite
  from tensorboard.compat.proto.event_pb2 import Event
  from tensorboard.compat.proto.event_pb2 import SessionLog
  from torch.utils.tensorboard import SummaryWriter, FileWriter
label_desc: Use image node_id 16 for calling the Experiment obj's underlying member method code with example usage: obj.__save_images(metrics) without return types