code: def format_metrics(metrics, split, prefix=""):
      log = f"[{split}]" + prefix
      log += " ".join(
          [f"{key}: {value:.4f}" for key, value in metrics.items()]
      )
  
      return log
  
file_path: OpenPrompt/tutorial/9_UltraChat.py
imports: import argparse
  import torch
  from openprompt import plms
  from openprompt.plms import *
  from transformers import GPTJConfig, GPTJModel, GPTJForCausalLM, GPT2Tokenizer
  from openprompt.plms import load_plm
  from openprompt.prompts import MixedTemplate
  from openprompt.data_utils.conditional_generation_dataset import UltraChatProcessor
  from transformers import AdamW
  from openprompt import PromptDataLoader
  from openprompt import PromptForGeneration
  from transformers.optimization import get_linear_schedule_with_warmup
  from accelerate import Accelerator
  from torchmetrics import MeanMetric
  from sklearn.model_selection import train_test_split
  from tqdm import tqdm
  from accelerate.utils import set_seed
label_desc: Use image node_id 1 for calling a global function with example usage: format_metrics(metrics, split, prefix) and returns: log