code: def evaluate_documents(documents, metric, beta=1):
      evaluator = Evaluator(metric, beta=beta)
      for document in documents:
          evaluator.update(document)
      return (
          evaluator.get_precision(),
          evaluator.get_recall(),
          evaluator.get_f1(),
      )
  
imports: import logging
  import numpy
  from collections import Counter, defaultdict
  from scipy.optimize import linear_sum_assignment
  from .blanc import blanc, tuple_to_metric
label_desc: Use image node_id 2 for calling a global function with example usage: evaluate_documents(documents, metric, beta) and returns: evaluator,  evaluator,  evaluator