code: def log_loss_accuracy(
      self,
      loss,
      accuracy,
      epoch,
      prefix,
      should_print=True,
      write2file=True,
  ):
      if should_print:
          print(
              "mean cross_entropy: %f, mean accuracy: %f"
              % (loss, accuracy)
          )
      summary = tf.Summary(
          value=[
              tf.Summary.Value(
                  tag="loss_%s" % prefix, simple_value=float(loss)
              ),
              tf.Summary.Value(
                  tag="accuracy_%s" % prefix,
                  simple_value=float(accuracy),
              ),
          ]
      )
      self.summary_writer.add_summary(summary, epoch)
      if write2file and prefix == "valid":
          with open("%s/console.txt" % self.logs_path, "a") as fout:
              fout.write(
                  "%d: mean cross_entropy: %f, mean accuracy: %f\n"
                  % (epoch, loss, accuracy)
              )
  
imports: import os
  import shutil
  import tensorflow
  import numpy
  import time
  from datetime import timedelta
  import json
  import pickle
label_desc: Use image node_id 15 for calling the BasicModel obj's underlying member method code with example usage: obj.log_loss_accuracy(loss, accuracy, epoch, prefix, should_print, write2file) without return types