code: def update(
      self,
      predicted_entities,
      predicted_relations,
      gold_entities,
      gold_relations,
  ):
      self.ent_tp += len(set(predicted_entities) & set(gold_entities))
      self.ent_fn += len(set(gold_entities) - set(predicted_entities))
      self.ent_fp += len(set(predicted_entities) - set(gold_entities))
  
      self.rel_p_tp += len(
          set(predicted_relations) & set(gold_relations)
      )
      self.rel_p_fn += len(
          set(gold_relations) - set(predicted_relations)
      )
      self.rel_p_fp += len(
          set(predicted_relations) - set(gold_relations)
      )
  
      reduced_predicted_relations = [x[:3] for x in predicted_relations]
      reduced_gold_relations = [x[:3] for x in gold_relations]
  
      self.rel_tp += len(
          set(reduced_predicted_relations) & set(reduced_gold_relations)
      )
      self.rel_fn += len(
          set(reduced_gold_relations) - set(reduced_predicted_relations)
      )
      self.rel_fp += len(
          set(reduced_predicted_relations) - set(reduced_gold_relations)
      )
  
      return
  
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 the EREEvaluator obj's underlying member method code with example usage: obj.update(predicted_entities, predicted_relations, gold_entities, gold_relations) without return types