code: def write_eval_metric(summary_writer, eval_metrics, step):
      for metric_name, value in eval_metrics.items():
          summary_writer.scalar(f"eval_{metric_name}", value, step)
  
imports: import logging
  import os
  import sys
  import time
  from collections import defaultdict
  from dataclasses import dataclass, field
  from pathlib import Path
  from typing import Dict, List, Optional, Tuple
  import datasets
  import flax
  import jax
  import jax.numpy
  import numpy
  import optax
  from datasets import load_dataset
  from flax import jax_utils, traverse_util
  from flax.training import train_state
  from flax.training.common_utils import get_metrics, onehot, shard
  from tqdm import tqdm
  from transformers import CONFIG_MAPPING, FLAX_MODEL_FOR_MASKED_LM_MAPPING, AutoConfig, AutoTokenizer, FlaxAutoModelForMaskedLM, HfArgumentParser, PreTrainedTokenizerBase, TensorType, TrainingArguments, is_tensorboard_available, set_seed
label_desc: Use image node_id 4 for calling a global function with example usage: write_eval_metric(summary_writer, eval_metrics, step) without return types