code: def test(
      rank,
      batch_size,
      data_set,
      executor,
      test_program,
      data_feeder,
      fetch_list,
  ):
      data_list = data_set[0]
      issame_list = data_set[1]
      embeddings_list = []
  
      # data_list[0] for normalize
      # data_list[1] for flip_left_right
      for i in range(len(data_list)):
          data = data_list[i]
          embeddings = None
          ba = 0
          while ba < data.shape[0]:
              bb = min(ba + batch_size, data.shape[0])
              count = bb - ba
              _data = []
              for k in range(bb - batch_size, bb):
                  _data.append((data[k],))
              [_embeddings] = executor.run(
                  test_program,
                  fetch_list=fetch_list,
                  feed=data_feeder.feed(_data),
                  use_program_cache=True,
              )
              if embeddings is None:
                  embeddings = np.zeros(
                      (data.shape[0], _embeddings.shape[1])
                  )
              embeddings[ba:bb, :] = _embeddings[
                  (batch_size - count) :, :
              ]
              ba = bb
          embeddings_list.append(embeddings)
  
      xnorm = 0.0
      xnorm_cnt = 0
      for embed in embeddings_list:
          xnorm += np.sqrt((embed * embed).sum(axis=1)).sum(axis=0)
          xnorm_cnt += embed.shape[0]
      xnorm /= xnorm_cnt
  
      embeddings = embeddings_list[0] + embeddings_list[1]
      embeddings = sklearn.preprocessing.normalize(embeddings)
      _, _, accuracy, val, val_std, far = evaluate(
          embeddings, issame_list, nrof_folds=10
      )
      acc, std = np.mean(accuracy), np.std(accuracy)
      return acc, std, xnorm
  
file_path: insightface/recognition/arcface_paddle/static/utils/verification.py
imports: import time
  import os
  import numpy
  import sklearn
  import paddle
  import logging
  from utils.verification import evaluate
  from datasets import load_bin
label_desc: Use image node_id 1 for calling a global function with example usage: test(rank, batch_size, data_set, executor, test_program, data_feeder, fetch_list) and returns: acc,  std,  xnorm