code: def conll_score(preds, tgts, tag_types):
      # preds is a list and each elements is the list of tags of a sentence
      # tgts is a lits and each elements is the tensor of tags of a text
      pred_list = []
      tgt_list = []
  
      for idx in range(len(preds)):
          pred_list.append(preds[idx].cpu().clone().numpy())
      for idx in range(len(tgts)):
          tgt_list.extend(tgts[idx].cpu().clone().numpy().tolist())
      pred_tags = [tag_types[int(pred)] for pred in pred_list]
      tgt_tags = [tag_types[int(tgt)] for tgt in tgt_list]
      prec, rec, f1 = evaluate(tgt_tags, pred_tags, verbose=False)
      return prec, rec, f1
  
imports: import argparse
  import os
  import torch
  import torch.backends.cudnn
  import torch.multiprocessing
  import torch.optim
  from torch.utils.data import DataLoader
  from graph4nlp.pytorch.data.data import from_batch
  from graph4nlp.pytorch.modules.evaluation.accuracy import Accuracy
  from graph4nlp.pytorch.modules.graph_construction import NodeEmbeddingBasedRefinedGraphConstruction
  from graph4nlp.pytorch.modules.graph_construction.node_embedding_based_graph_construction import NodeEmbeddingBasedGraphConstruction
  from graph4nlp.pytorch.modules.utils.generic_utils import to_cuda
  from conll import ConllDataset
  from conlleval import evaluate
  from dependency_graph_construction_without_tokenize import DependencyBasedGraphConstruction_without_tokenizer
  from line_graph_construction import LineBasedGraphConstruction
  from model import Word2tag
label_desc: Use image node_id 2 for calling a global function with example usage: conll_score(preds, tgts, tag_types) and returns: prec,  rec,  f1