code: def format_log(loss, split):
      if args.dataset in ["enwik8", "text8"]:
          log_str = "| {0} loss {1:5.2f} | {0} bpc {2:9.5f} ".format(
              split, loss, loss / math.log(2)
          )
      else:
          log_str = "| {0} loss {1:5.2f} | {0} ppl {2:9.3f} ".format(
              split, loss, math.exp(loss)
          )
      return log_str
  
file_path: smart-moe/examples/transformer-xl/eval.py
imports: import argparse
  import time
  import math
  import os, sys
  import torch
  from data_utils import get_lm_corpus
  from mem_transformer import MemTransformerLM
  from utils.exp_utils import get_logger
label_desc: Use image node_id 2 for calling a global function with example usage: format_log(loss, split) and returns: log_str